-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issue when email link user tries to sign in with FirebaseUI whe…
…n only email/password sign in method is provided. (#710) In this case, we should just fallback to unsupported provider screen.
- Loading branch information
1 parent
6067268
commit 7404a41
Showing
2 changed files
with
39 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1925,6 +1925,22 @@ function testHandleSignInWithEmail_prefillEmail() { | |
} | ||
|
||
|
||
function testHandleSignInFetchSignInMethodsForEmail_unsupportedProvider() { | ||
// When user has previously signed in with email link but only email/password | ||
// auth is supported in the app's configuration. | ||
var signInMethods = ['emailLink']; | ||
var email = '[email protected]'; | ||
app.updateConfig('signInOptions', [{'provider': 'password'}]); | ||
firebaseui.auth.widget.handler.common.handleSignInFetchSignInMethodsForEmail( | ||
app, container, signInMethods, email); | ||
// It should not store pending email. | ||
assertFalse(firebaseui.auth.storage.hasPendingEmailCredential( | ||
app.getAppId())); | ||
// Unsupported provider page should show. | ||
assertUnsupportedProviderPage(email); | ||
} | ||
|
||
|
||
function testLoadAccountchooserJs_externallyLoaded() { | ||
// Test accountchooser.com client loading when already loaded. | ||
// Reset loadAccountchooserJs stubs. | ||
|