Skip to content

Commit

Permalink
Merge pull request #42 from Achintha444/main
Browse files Browse the repository at this point in the history
docs: Fix some issues of the Asgardeo-Android mobile SDK
  • Loading branch information
pavinduLakshan authored Aug 13, 2024
2 parents 9a4eaef + 9023aec commit 4c93d92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/website/android/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This SDK assists you in creating custom login flows directly within the applicat
This should be consistent with the CallBack URL of the Service Provider that you configured in the Asgardeo.
For example, if you have configured the CallBack URL as *wso2sample://oauth2*, then the `appAuthRedirectScheme` should be *wso2sample*.
For example, if you have configured the CallBack URL as *wso2.apiauth.sample.android://oauth2*, then the `appAuthRedirectScheme` should be *wso2.apiauth.sample.android*.
```groovy
android.defaultConfig.manifestPlaceholders.putAll(
Expand Down
8 changes: 4 additions & 4 deletions docs/website/android/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
val authenticationProvider: AuthenticationProvider = asgardeoAuth.getAuthenticationProvider()
```

<a href="/mobile-ui-sdks/android/api/core-auth-direct/io.asgardeo.android.core_auth_direct.provider.providers.authentication/-authentication-provider/index.html" target="_blank">AuthenticationProvider</a> handles the authentication process using `SharedFlow`. This will help you to handle each state of the authentication process easily. There are four states in the authentication process (<a href="/mobile-ui-sdks/android/api/core-auth-direct/io.asgardeo.android.core_auth_direct.models.state/-authentication-state/index.html" target="_blank">AuthenticationState</a>):
<a href="/mobile-ui-sdks/android/api/core-auth-direct/io.asgardeo.android.core_auth_direct.provider.providers.authentication/-authentication-provider/index.html" target="_blank">AuthenticationProvider</a> handles the authentication process using [SharedFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow#sharedflow). This will help you to handle each state of the authentication process easily. There are four states in the authentication process (<a href="/mobile-ui-sdks/android/api/core-auth-direct/io.asgardeo.android.core_auth_direct.models.state/-authentication-state/index.html" target="_blank">AuthenticationState</a>):

- **AuthenticationState.Initial**: Initial state of the authentication process.
- **AuthenticationState.Loading**: SDK is calling an API to handle the authentication and waiting for the result.
Expand Down Expand Up @@ -90,21 +90,21 @@ private fun HandleAuthenticationState(authenticationStateFlow: SharedFlow<Authen
authenticationProvider.initializeAuthentication(context) // [!code highlight]
}
is AuthenticationState.Unauthenticated -> {
/**
/**
* Gets called when /authorize and /authn responds with an “INCOMPLETE” state.
* This means authentication flow is still not completed and a particular step is getting
* challenged for authentication.
*/
LoginForm(it.authenticationFlow)
}
is AuthenticationState.Error -> {
/**
/**
* Gets called when /authorize and /authn responds with an “FAILED_INCOMPLETE” state
* which responds at an error of a particular authentication step
*/
}
is AuthenticationState.Authenticated -> {
/**
/**
* Gets called when /authn responds with an “SUCCESS” state. This means
* authentication flow is completed
*/
Expand Down

0 comments on commit 4c93d92

Please sign in to comment.