Skip to content

Commit 7ca1c59

Browse files
authored
Updated documentation to pass an activity context for login and logout (#808)
1 parent f03048f commit 7ca1c59

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

auth0/src/main/java/com/auth0/android/provider/WebAuthProvider.kt

+9-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public object WebAuthProvider {
223223
* An error is raised if there are no browser applications installed in the device or if
224224
* the user closed the browser before completing the logout.
225225
*
226-
* @param context to run the log out
226+
* @param context An activity context to run the log out. Passing any other context can cause a crash while starting the [AuthenticationActivity]
227227
* @param callback to invoke when log out is successful
228228
* @see AuthenticationException.isBrowserAppNotAvailable
229229
* @see AuthenticationException.isAuthenticationCanceled
@@ -524,7 +524,7 @@ public object WebAuthProvider {
524524
* device does not support the necessary algorithms to support Proof of Key Exchange (PKCE)
525525
* (this is not expected), or if the user closed the browser before completing the authentication.
526526
*
527-
* @param context context to run the authentication
527+
* @param context An Activity context to run the authentication. Passing any other context can cause a crash while starting the [AuthenticationActivity]
528528
* @param callback to receive the parsed results
529529
* @see AuthenticationException.isBrowserAppNotAvailable
530530
* @see AuthenticationException.isPKCENotAvailable
@@ -574,6 +574,13 @@ public object WebAuthProvider {
574574
manager.startAuthentication(context, redirectUri!!, 110)
575575
}
576576

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

0 commit comments

Comments
 (0)