mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
update android apple login redirect uri
This commit is contained in:
parent
9888285556
commit
8ca10ea75e
2 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue