-
Notifications
You must be signed in to change notification settings - Fork 938
Add initial bare-bones Cordova support / popup redirect #4379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
export { browserLocalPersistence } from './src/platform_browser/persistence/local_storage'; | ||
export { browserSessionPersistence } from './src/platform_browser/persistence/session_storage'; | ||
|
||
export { cordovaPopupRedirectResolver } from './src/platform_cordova/popup_redirect'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to export this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It can be used independently (if you use initializeAuth()
for example instead of getAuth()
)
packages-exp/auth-exp/src/platform_cordova/popup_redirect.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/platform_cordova/popup_redirect.test.ts
Outdated
Show resolved
Hide resolved
}); | ||
}); | ||
|
||
function setExpectedPluginsButMissing(missingPlugins: string[]): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's probably easier to just have this function mock the whole thing (with all plugins), and then write things like delete window.universalLinks.subscribe
in individual tests. It's more straightforward and don't need the awkward object traversing below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Still have to do a bit of a dance because the package doesn't mark those as optional. Still cleaner 👍
packages-exp/auth-exp/src/platform_cordova/popup_redirect.test.ts
Outdated
Show resolved
Hide resolved
983c226
to
e228278
Compare
No description provided.