Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okrad/oauth2_client_test
An example Flutter application for the oauth2_client library.
https://github.com/okrad/oauth2_client_test
example flutter oauth oauth2 oauth2-client
Last synced: 2 months ago
JSON representation
An example Flutter application for the oauth2_client library.
- Host: GitHub
- URL: https://github.com/okrad/oauth2_client_test
- Owner: okrad
- Created: 2020-04-22T14:38:21.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-13T21:52:03.000Z (over 4 years ago)
- Last Synced: 2023-08-14T06:33:13.663Z (over 1 year ago)
- Topics: example, flutter, oauth, oauth2, oauth2-client
- Language: Dart
- Homepage: https://github.com/teranetsrl/oauth2_client
- Size: 62.5 KB
- Stars: 7
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# oauth2_client_test
An example Flutter application for the [oauth2_client](https://pub.dev/packages/oauth2_client) library.
## Getting Started
Clone the repo, then register your application on the provider you are going to test on.
For the sake of simplicity you can use _mytestapp://oauth2redirect_ as the redirect uri in the application registration form. In this case you won't need to change anything.If you want to use your own redirect uri instead, you *must* modify the _AndroidManifest.xml_ file changing the _android:scheme_ attribute to the custom scheme of your redirect url. Then you must change the _main.dart_ file, updating the two variables _redirectUri_ and _customUriScheme_ with the corresponding values.
For example, if your redirect url is "my.custom.app://redirect", the _android:scheme_ attribute and the _customUriScheme_ variable will be "my.custom.app", while the _redirectUri_ variable will be "my.custom.app://redirect".
Run the app on an emulator or an actual device.
Select the client type, then fill the TextFields with your application's client id, client secret and required scopes (as a comma separated list).
Finally press the "Authorize" button.
You should be redirected to the server authorization page.Once you have granted authorization, you should be redirected back to the app and see the generated Access Token in the corresponding field.