Skip to content

Commit 9dabe70

Browse files
committed
docs: Update README to clarify deep link handling for OAuth providers
1 parent 4ba29c0 commit 9dabe70

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,20 @@ Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontal
116116
}
117117

118118

119-
// For Sign In With Apple or other OAuthProviders, you need to call handleDeepLink from iOSApp file(ie. entry point)
119+
// For all OAuthProviders except Apple, you need to call handleDeepLink from iOSApp file(ie. entry point)
120120

121-
// Call this method in onOpenUrl method of iOSApp file:
121+
// Call this method in onOpenUrl method of iOSApp file, this is not needed for sign in with apple for iOS
122+
// becoz for iOS we are using AuthenticationServices + supabase signInWithIdToken but not signInWith oauth provider, but on Android, its needed:
122123

123124
ContentView()
124125
.onOpenURL { url in
125126

126127
// Handle supabase deep link url
127-
//If using only kmauth-apple
128-
KMAuthApple.shared.deepLinkHandler().handleDeepLinks(url: url)
129-
130-
//If using kmauth-supabase directly
131-
//KMAuthSupabase.shared.deepLinkHandler().handleDeepLinks(url: url)
128+
//If using kmauth-supabase
129+
KMAuthSupabase.shared.deepLinkHandler().handleDeepLinks(url: url)
132130
}
133131

134-
//Similarly for android, call this method in MainActivity:
135-
132+
//Similarly for android, call this method in MainActivity, We need Android deep link handling code for Apple oauth provider as well along with other oauth providers of supabase:
136133

137134

138135
override fun onNewIntent(
@@ -231,7 +228,6 @@ listOf(
231228
isStatic = true
232229

233230
// Here: Export it to iosApp xcode project for calling handleDeepLink
234-
export("io.github.sunildhiman90:kmauth-apple:<version>") //if using Sign In with Apple
235231
export("io.github.sunildhiman90:kmauth-supabase:<version>") // if using Sign In with other OAuthProviders
236232
}
237233
}

0 commit comments

Comments
 (0)