update android apple login redirect uri
This commit is contained in:
@ -12,7 +12,7 @@ object DatastoreKeys {
|
||||
|
||||
object AppleConstants {
|
||||
const val clientId = "app.omnivore"
|
||||
const val redirectURI = "https%3A%2F%2Fapi-demo.omnivore.app%2Fapi%2Fauth%2Fvercel%2Fapple-redirect"
|
||||
const val redirectURI = "https%3A%2F%2Fapi-demo.omnivore.app%2Fapi%2Fmobile-auth%2Fandroid-apple-redirect"
|
||||
const val scope = "name%20email"
|
||||
const val authUrl = "https://appleid.apple.com/auth/authorize"
|
||||
}
|
||||
|
||||
@ -88,9 +88,10 @@ fun AppleAuthWebView(onDismiss: (String?) -> Unit) {
|
||||
)
|
||||
webViewClient = object : WebViewClient() {
|
||||
override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean {
|
||||
if (request?.url.toString().contains("client/auth")) {
|
||||
if (request?.url.toString().contains("android-apple-token")) {
|
||||
val uri = Uri.parse(request!!.url.toString())
|
||||
val token = uri.getQueryParameter("tok")
|
||||
val token = uri.getQueryParameter("token")
|
||||
|
||||
onDismiss(token)
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user