Skip to content

Flutter example on how to authenticate with Discord's OAuth2 and use the User's API endpoint.

License

Notifications You must be signed in to change notification settings

brunotacca/flutter_discord_oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of Discord's OAuth2 - User API

Example project using Flutter and MobX to authenticate an user with Discord's OAuth2 flow. Since the User Token has just few uses according to the docs, it just shows the User Info and the Guilds Info.

It is easily customizable to any OAuth2 services implementing PKCE.

It can save the credentials via SharedPreferences (no need to login again) along with a cool theme switcher (light/dark) and a custom discord icon.

There are better ways to store your app credentials, I do NOT recommend using this model to publish your app.

Information Sources:

Discord OAuth2 Docs: https://discord.com/developers/docs/topics/oauth2

Discord Application Page: https://discord.com/developers/applications

Flutter Docs: https://flutter.dev/docs

Dart OAuth2: https://pub.dev/packages/oauth2

Flutter MobX: https://pub.dev/packages/mobx

Flutter Webview: https://pub.dev/packages/webview_flutter

Cool Screenshots

About

Flutter example on how to authenticate with Discord's OAuth2 and use the User's API endpoint.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages