Skip to content
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

Updated documentation to pass an activity context for login and logout #808

Merged
merged 3 commits into from
Mar 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public object WebAuthProvider {
* An error is raised if there are no browser applications installed in the device or if
* the user closed the browser before completing the logout.
*
* @param context to run the log out
* @param context An activity context to run the log out. Passing any other context can cause a crash while starting the [AuthenticationActivity]
* @param callback to invoke when log out is successful
* @see AuthenticationException.isBrowserAppNotAvailable
* @see AuthenticationException.isAuthenticationCanceled
Expand Down Expand Up @@ -524,7 +524,7 @@ public object WebAuthProvider {
* device does not support the necessary algorithms to support Proof of Key Exchange (PKCE)
* (this is not expected), or if the user closed the browser before completing the authentication.
*
* @param context context to run the authentication
* @param context An Activity context to run the authentication. Passing any other context can cause a crash while starting the [AuthenticationActivity]
* @param callback to receive the parsed results
* @see AuthenticationException.isBrowserAppNotAvailable
* @see AuthenticationException.isPKCENotAvailable
Expand Down Expand Up @@ -574,6 +574,13 @@ public object WebAuthProvider {
manager.startAuthentication(context, redirectUri!!, 110)
}

/**
* Request user Authentication. An error is thrown if there are no browser applications installed in the device, or if
* device does not support the necessary algorithms to support Proof of Key Exchange (PKCE)
* (this is not expected), or if the user closed the browser before completing the authentication.
*
* @param context An Activity context to run the authentication. Passing any other context can cause a crash while starting the [AuthenticationActivity]
*/
@JvmSynthetic
@Throws(AuthenticationException::class)
public suspend fun await(context: Context): Credentials {
Expand Down