-
Notifications
You must be signed in to change notification settings - Fork 53
Update to oauth2 package README for Flutter Web info #1961
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
dffe5ac
to
c5f215a
Compare
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
c5f215a
to
b7a4743
Compare
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
|
||
1. To handle redirect on Flutter Web you would need to add a html file to the web folder with some | ||
additional JS code to handle the redirect back to the app (in this example the code will be saved | ||
and passed through localStorage). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of depends on how you configure your oauth2 flow and what you're redirect URL is, doesn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonasfj while the redirect behavior on Flutter Web does depend on how the OAuth2 flow is configured and the redirect URI set in the provider - the example I added is meant to provide a minimal working solution for handling redirects specifically when using implicit or authorization code flows with a custom redirect HTML page (which I think is the most common use case).
The intent is to give developers a concrete starting point, since the existing documentation and issues (e.g., #350) don’t cover a practical approach for Web, and a lot of stackoverflow questions/issues indicate that developers are often confused by this.
209b4c4
to
6d5fef3
Compare
Description:
This PR updates the README file of oauth2 package relating to the listen and redirect section. The reason being even though the provided information underlines that both listen and redirect are not the scopes of this library the provided example is both obsolete (uni_links is discontinued for app_links) and does not include Flutter Web ( neither web_views nor app_links can be used to implement the flow). As such I believe it could be useful to have a section mentioning how to use this library with Web.
There was an issue opened for this but the solution is still a bit unclear nor is it documented anywhere: #350
Solution