Skip to content

Commit

Permalink
fix: Fixed various problems with deep links.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyost committed Jul 11, 2024
1 parent d8491fb commit dcfa646
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,23 @@
<data
android:host="login.openauthenticator.app"
android:scheme="https" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="open-authenticator-by-skyost.firebaseapp.com"
android:scheme="https" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="totp"
android:scheme="otpauth" />
Expand Down
3 changes: 3 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ class _RouteWidgetState extends ConsumerState<_RouteWidget> {
switch (mode) {
case 'signIn':
EmailLinkAuthenticationProvider emailAuthenticationProvider = ref.read(emailLinkAuthenticationProvider.notifier);
if (!(await emailAuthenticationProvider.isWaitingForConfirmation())) {
return;
}
Result<AuthenticationObject> result = await emailAuthenticationProvider.confirm(context, link.toString());
if (mounted) {
AccountUtils.handleAuthenticationResult(context, ref, result);
Expand Down

0 comments on commit dcfa646

Please sign in to comment.