-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
OAuth2 authorization code flow example with CustomProtocol #127
Comments
Feel free to open PR for adding any example :) |
Well, maybe this would be even better as a tauri plugin... Seems quite useful. |
I'm probably not going to work on a plug-in, but you have my permission to harvest what's ripe in the code. I'm a little troubled with making the example useful. It needs an OAuth endpoint, it needs an app set up, it needs a user in the system... Would you think we can expect that much from a casual example explorer? Or could you host some sample setup to try this with? Azure AD or Google or GitHub? I suspect that otherwise it will be just interesting code to look at and move on. |
Curiously, I managed to get my example through a GitLab OAuth. The only thing is I hit the same bug as samdroid-apps/something-for-reddit#61 - the screen says "Redirection to URL with a scheme that is not HTTP(S)", but right-click and reload gets me through. This is a webkit trouble according to the bug report. Example: oauthorize -a https://gitlab.com/oauth/authorize -c 3ee80cff1118649558d2201945118ff4cb68247be07ec8723ccb9e1b6ad86548 -r oauth2://authenticate/ -s email I think something similar could be done with GitHub so there is a working example. |
I think the workaround could be starting another window but I'm not sure how it goes either. |
Close this because we now have a custom protocol example |
I've tried to complete an OAuth2 authorization code flow with wry and it worked! It demonstrates the CustomProtocol for the redirect URI with a custom scheme as requested in #39 . This is great because the alternative is either a device code flow, which is clumsy, or starting your own web server just to receive the redirect URL information...
Describe the solution you'd like
I'd like the example to be added, perhaps a little more polished.
Describe alternatives you've considered
Would you assign yourself to implement this feature?
Additional context
The tool opens a full screen authentication dialogue. One has to provide valid your-tenant-id, your-client-id, redirect-uri, ... After successful authentication or on failure, the tool receives the redirect URL and prints it to the console.
The text was updated successfully, but these errors were encountered: