Skip to content

Add Flutter AppAuth integration sample - #3

Merged
brionmario merged 1 commit into
thunder-id:mainfrom
Yasasr1:flutter-appauth-sample
Oct 13, 2026
Merged

brionmario merged 1 commit into
thunder-id:mainfrom
Yasasr1:flutter-appauth-sample

Conversation

@Yasasr1

@Yasasr1 Yasasr1 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Purpose

Add a Flutter sample app that signs users in to ThunderID with flutter_appauth, the OpenID Connect plugin that wraps AppAuth for iOS and Android. It backs the Flutter AppAuth integration guide in the ThunderID docs.

The sample was first added in the ThunderID repo with the guide, and is moved here as requested in the review: thunder-id/thunderid#5599 (comment)

Approach

This PR adds samples/integrations/flutter-app-auth, a minimal Flutter app that runs the guide's code end to end on Android and iOS.

File What it does
lib/auth_config.dart Issuer, client ID, redirect URIs, and scopes, read from --dart-define
lib/auth_service.dart Sign-in with authorization code and PKCE, token refresh, session restore, and sign-out through the end session endpoint
lib/main.dart A single screen that drives the service
android/app/build.gradle.kts, ios/Runner/Info.plist Register the com.example.appauth redirect scheme
  • Settings are passed with --dart-define=THUNDERID_CLIENT_ID=<client-id> (and optionally THUNDERID_ISSUER), so no credentials live in the source.
  • flutter_secure_storage stores the refresh token so the session is restored after a restart.
  • Debug builds trust user-installed certificates so the sample can reach a local ThunderID with its self-signed certificate. Release builds do not.
  • The PR builder only builds samples with a package.json, so this sample is not picked up by CI.

Related Issues

Related PRs

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Signed-off-by: Yasas Ramanayaka <36619815+Yasasr1@users.noreply.github.com>
@Yasasr1
Yasasr1 force-pushed the flutter-appauth-sample branch from 60ad28a to 492d589 Compare October 13, 2026 05:36
@brionmario
brionmario merged commit 22e406d into thunder-id:main Oct 13, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants