-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Test OAuth2 Workflow Locally Due to Fixed redirect_uri
Constraint
#174
Comments
Current Solution after Scrum meeting this morning (2025-01-10): push the code directly to production server and test this workflow, but quickly revert changes if something goes wrong. |
When you attempt this workflow locally, are you being redirected to |
Thank you for the comments. @dchiller Maybe I didn't describe it clearly. Let me try to clarify. If I'm still not clear enough, or if I'm doing anything which is obviously wrong, please let me know.
|
Gotcha! So what I'm suggesting is that, in that last screenschot, you manually change If your local site doesn't work when you make that manual change, then, if I'm understanding the issue correctly, the production site won't either. |
The following is from ChatGPT
|
Make your local machine vim.simssa.ca by editing the hosts file on your machine? Since it’s all client side your browser won’t know that it’s not communicating with the “real” service. |
Thank you for the suggestion! I'll try to learn how to edit hosts file on my machine. |
@kunfang98927 RE: the discussion in meeting Did you map And then, can you share where the code is that handles the redirect? |
@dchiller Yes, I add When developing, the vim server is running on After I add this line ( Same if I go to Here's the code of how I implement the redirecting:
|
What I want to add is that I think the I think where we are stuck is that the |
You need a web server to proxy your Django app from port 443 to port 8000 on your local machine. You will also probably need the SSL certificates locally so that ssl works. You could also do a self signed certificate. |
Description
I am working on integrating the OAuth2 workflow for publishing new instrument names/images to Wikidata. While implementing the workflow, I encountered an issue with the
redirect_uri
:http://localhost:8000
).localhost
, as it requires a publicly accessible URL for theredirect_uri
, which ishttps://vim.simssa.ca/oauth/callback
. (This uri was registered when I applied for the OAuth2 consumer, and can not be changed.) Here is the screenshot of the approved OAuth2 consumer:Steps to Reproduce
instrument list
page, when users try to add new instrument names directly to wikidata, they will click on aAuthorize
button.redirect_uri
(https://vim.simssa.ca/oauth/callback
), which is inaccessible when developing locally.Questions
redirect_uri
?The text was updated successfully, but these errors were encountered: