feat: Support WebAuth application context - #356
Open
baksha97 wants to merge 1 commit into
Open
Conversation
Contributor
|
Hi @baksha97, thanks for your contribution. This looks great, but we don't want to launch ForegroundActivity as new task if the provided context is an Activity. We do already capture application context in this SDK, so we may be able to provide a login function for web login that doesn't take in a context. @FeiChen-okta, I think this is an interesting use case and something we can support with not too much changes |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change enables web authentication to be launched during application startup when bootstrapping Okta.
Without this, a custom
WebAuthenticationProviderthat supports an application context would still fail, as the Android runtime throws an error when resolving theForegroundActivityintent.The update allows launching
ForegroundActivityexplicitly using an application context instead of implicitly depending on an activity context.This should be a safe approach since:
ForegroundActivityshould only be launched by a user interaction to trigger web authForegroundActivityis not an exported activity since it's internal to Okta's implementationForegroundActivity.