[js][auth] add isSignInWithEmailLink method
This commit is contained in:
parent
56ffaac06b
commit
b98276c2a5
|
@ -406,6 +406,18 @@ export default class Auth extends ModuleBase {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an incoming link is a sign-in with email link.
|
||||
* @param {string} emailLink Sign-in email link.
|
||||
*/
|
||||
isSignInWithEmailLink(emailLink: string): boolean {
|
||||
return (
|
||||
typeof emailLink === 'string' &&
|
||||
emailLink.includes('mode=signIn') &&
|
||||
emailLink.includes('oobCode=')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Completes the password reset process, given a confirmation code and new password.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue