Skip to content

Commit

Permalink
Added comments to call out other AuthProviders
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhengshs committed Apr 10, 2024
1 parent 781ebfe commit a4ba04d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ For now, just add this method to the `onCreate` method of MainActivity with what
<Block name="Java">

```java
// Replace facebook with your chosen auth provider such as google, amazon, or apple
Amplify.Auth.signInWithSocialWebUI(
AuthProvider.facebook(),
AuthProvider.facebook(),
this,
result -> Log.i("AuthQuickstart", result.toString()),
error -> Log.e("AuthQuickstart", error.toString())
Expand All @@ -16,8 +17,9 @@ Amplify.Auth.signInWithSocialWebUI(
<Block name="Kotlin - Callbacks">

```kotlin
// Replace facebook with your chosen auth provider such as google, amazon, or apple
Amplify.Auth.signInWithSocialWebUI(
AuthProvider.facebook(),
AuthProvider.facebook(),
this,
{ Log.i("AuthQuickstart", "Sign in OK: $it") },
{ Log.e("AuthQuickstart", "Sign in failed", it) }
Expand All @@ -29,6 +31,7 @@ Amplify.Auth.signInWithSocialWebUI(

```kotlin
try {
// Replace facebook with your chosen auth provider such as google, amazon, or apple
val result = Amplify.Auth.signInWithSocialWebUI(AuthProvider.facebook(), this)
Log.i("AuthQuickstart", "Sign in OK: $result")
} catch (error: AuthException) {
Expand All @@ -40,6 +43,7 @@ try {
<Block name="RxJava">

```java
// Replace facebook with your chosen auth provider such as google, amazon, or apple
RxAmplify.Auth.signInWithSocialWebUI(AuthProvider.facebook(), this)
.subscribe(
result -> Log.i("AuthQuickstart", result.toString()),
Expand Down

0 comments on commit a4ba04d

Please sign in to comment.