Comments (4)
I tried to make my app work on Android and have the same problem. Here's the log from Android Studio. This log shows from when I click "Login". After that, it redirects to Chrome, detects I'm already logged in, then redirects back to my app. It'd be handy if it was possible to see if the user is logged in w/o opening a browser window.
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xc85241a0: ver 3 0 (tinfo 0xc855d300)
V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 22988608, pluginId: OAuth2Client, methodName: authenticate
V/Capacitor: callback: 22988608, pluginId: OAuth2Client, methodName: authenticate, methodData: {"appId":"0oaft6l2biU6Yotr3356","authorizationBaseUrl":"https:\/\/dev-133320.okta.com\/oauth2\/default\/v1\/authorize","accessTokenEndpoint":"https:\/\/dev-133320.okta.com\/oauth2\/default\/v1\/token","scope":"email openid profile","resourceUrl":"https:\/\/dev-133320.okta.com\/oauth2\/default\/v1\/userinfo","web":{"redirectUrl":"http:\/\/localhost:8100","windowOptions":"height=600,left=0,top=0","additionalParameters":{"nonce":"6fpe8"}},"ios":{"appId":"0oaft6kwksPlgarMw356","responseType":"code","customScheme":"com.okta.dev-133320:\/callback"},"android":{"appId":"0oaft6kwksPlgarMw356","responseType":"code","customScheme":"com.okta.dev-133320:\/callback"}}
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/Capacitor: Starting activity for result
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/Capacitor: App paused
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@7d12645
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xc85241a0: ver 3 0 (tinfo 0xc855d300)
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xc85241a0: ver 3 0 (tinfo 0xc855d300)
D/EGL_emulation: eglMakeCurrent: 0xc85241a0: ver 3 0 (tinfo 0xc855d300)
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xc85241a0: ver 3 0 (tinfo 0xc855d300)
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@3fad8fd
D/EGL_emulation: eglMakeCurrent: 0xc85241a0: ver 3 0 (tinfo 0xc855d300)
D/Capacitor/Plugin/App: Firing change: true
V/Capacitor/Plugin/App: Notifying listeners for event appStateChange
D/Capacitor/Plugin/App: No listeners found for event appStateChange
D/Capacitor: App resumed
V/Capacitor/Plugin/Network: Notifying listeners for event networkStatusChange
D/Capacitor/Plugin/Network: No listeners found for event networkStatusChange
D/EGL_emulation: eglMakeCurrent: 0xc85241a0: ver 3 0 (tinfo 0xc855d300)
Strangely, if I "re-run app" in Android Studio, it works the first time I click "Login". However, if I log out and log in again, it doesn't work.
Here's the logs when it works.
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 53803163, pluginId: OAuth2Client, methodName: authenticate
V/Capacitor: callback: 53803163, pluginId: OAuth2Client, methodName: authenticate, methodData: {"appId":"0oaft6l2biU6Yotr3356","authorizationBaseUrl":"https:\/\/dev-133320.okta.com\/oauth2\/default\/v1\/authorize","accessTokenEndpoint":"https:\/\/dev-133320.okta.com\/oauth2\/default\/v1\/token","scope":"email openid profile","resourceUrl":"https:\/\/dev-133320.okta.com\/oauth2\/default\/v1\/userinfo","web":{"redirectUrl":"http:\/\/localhost:8100","windowOptions":"height=600,left=0,top=0","additionalParameters":{"nonce":"jig3t"}},"ios":{"appId":"0oaft6kwksPlgarMw356","responseType":"code","customScheme":"com.okta.dev-133320:\/callback"},"android":{"appId":"0oaft6kwksPlgarMw356","responseType":"code","customScheme":"com.okta.dev-133320:\/callback"}}
D/Capacitor: Starting activity for result
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/Capacitor: App paused
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@3ebb31e
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@c514cc9
D/Capacitor/Plugin/App: Firing change: true
V/Capacitor/Plugin/App: Notifying listeners for event appStateChange
D/Capacitor/Plugin/App: No listeners found for event appStateChange
D/Capacitor: App resumed
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
V/Capacitor/Plugin/Network: Notifying listeners for event networkStatusChange
D/Capacitor/Plugin/Network: No listeners found for event networkStatusChange
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
V/Capacitor: callback: -1, pluginId: Console, methodName: log, methodData: {"level":"log","message":"response {\"sub\":\"00ueblyxoowgcboNP356\",\"name\":\"Okta Demo\",\"locale\":\"en-US\",\"email\":\"[email protected]\",\"preferred_username\":\"[email protected]\",\"given_name\":\"Okta\",\"family_name\":\"Demo\",\"zoneinfo\":\"America\/Los_Angeles\",\"updated_at\":1554746206,\"email_verified\":true,\"groups\":[\"Everyone\",\"ROLE_USER\"],\"access_token\":\"eyJraWQiOiJDZW1zVTJET21pRTRMSTlaSmtHQ2loSkZKM0pfZk5DdkFObGtkaVE2bGhjIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULkRJQWVqVzF1YUlTby0xQkxhY2VqWEktYlUybWIxbVh6M2JPRkpNdkFmUDAiLCJpc3MiOiJodHRwczovL2Rldi0xMzMzMjAub2t0YS5jb20vb2F1dGgyL2RlZmF1bHQiLCJhdWQiOiJhcGk6Ly9kZWZhdWx0IiwiaWF0IjoxNTU0NzQ4NjExLCJleHAiOjE1NTQ3NTIyMTEsImNpZCI6IjBvYWZ0Nmt3a3NQbGdhck13MzU2IiwidWlkIjoiMDB1ZWJseXhvb3dnY2JvTlAzNTYiLCJzY3AiOlsiZW1haWwiLCJvcGVuaWQiLCJwcm9maWxlIl0sInN1YiI6ImRlbW9Ab2t0YS5jb20ifQ.te4dhBtuyEBl4P1PyiU-2tameAlByrdbRiGv3IvVcyGPNCFBcPdV-gO4jnAyrRq6Tx4YhCTtAHrrw44A935K5YpiMC1IUAI17rDDHLYFTtYIxcT-k3LVaPHKKvUgW1SDeFUPcF8LYThVY2ylKEvL89RKGwSpoKrjs_eyl3RLyMA1X0yoofydJzqg0km1qNntrqDdNea-M3NDxlAlsSppkvf3c0BjSnbKOM1_bU5TppeTMcbfCjkej4JaZi_RcmY-TZPS_HUmSCMaV7y1_KisaHxcVLtza8VSWYRbG-WW-sU4avk9KvTqCfm7UOwCWlCgh_dQ7_Llyl9yibxXKrafYg\"}"}
I/Capacitor/Plugin/Console: response {"sub":"00ueblyxoowgcboNP356","name":"Okta Demo","locale":"en-US","email":"[email protected]","preferred_username":"[email protected]","given_name":"Okta","family_name":"Demo","zoneinfo":"America/Los_Angeles","updated_at":1554746206,"email_verified":true,"groups":["Everyone","ROLE_USER"],"access_token":"eyJraWQiOiJDZW1zVTJET21pRTRMSTlaSmtHQ2loSkZKM0pfZk5DdkFObGtkaVE2bGhjIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULkRJQWVqVzF1YUlTby0xQkxhY2VqWEktYlUybWIxbVh6M2JPRkpNdkFmUDAiLCJpc3MiOiJodHRwczovL2Rldi0xMzMzMjAub2t0YS5jb20vb2F1dGgyL2RlZmF1bHQiLCJhdWQiOiJhcGk6Ly9kZWZhdWx0IiwiaWF0IjoxNTU0NzQ4NjExLCJleHAiOjE1NTQ3NTIyMTEsImNpZCI6IjBvYWZ0Nmt3a3NQbGdhck13MzU2IiwidWlkIjoiMDB1ZWJseXhvb3dnY2JvTlAzNTYiLCJzY3AiOlsiZW1haWwiLCJvcGVuaWQiLCJwcm9maWxlIl0sInN1YiI6ImRlbW9Ab2t0YS5jb20ifQ.te4dhBtuyEBl4P1PyiU-2tameAlByrdbRiGv3IvVcyGPNCFBcPdV-gO4jnAyrRq6Tx4YhCTtAHrrw44A935K5YpiMC1IUAI17rDDHLYFTtYIxcT-k3LVaPHKKvUgW1SDeFUPcF8LYThVY2ylKEvL89RKGwSpoKrjs_eyl3RLyMA1X0yoofydJzqg0km1qNntrqDdNea-M3NDxlAlsSppkvf3c0BjSnbKOM1_bU5TppeTMcbfCjkej4JaZi_RcmY-TZPS_HUmSCMaV7y1_KisaHxcVLtza8VSWYRbG-WW-sU4avk9KvTqCfm7UOwCWlCgh_dQ7_Llyl9yibxXKrafYg"}
D/Capacitor: Handling local request: http://localhost/svg/md-book.svg
D/Capacitor: Handling local request: http://localhost/svg/md-build.svg
D/Capacitor: Handling local request: http://localhost/svg/md-grid.svg
D/Capacitor: Handling local request: http://localhost/svg/md-color-fill.svg
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
D/EGL_emulation: eglMakeCurrent: 0xe42da300: ver 3 0 (tinfo 0xe42b19c0)
W/.okta.develope: Attempt to remove non-JNI local reference, dumping thread
from generic-oauth2.
One way to add OIDC discovery might be to switch to AppAuth. It seems this project is already using it for Android. I've used it via react-native-app-auth and it works well in my experience.
from generic-oauth2.
This plugin does not support OpenID, but I create a task to check if it is really just a layer/convention on top of oauth2.
I cannot give you a timeframe until when I will be able to start working on the task, because I have very little sparetime for OSS right now.
See #49
from generic-oauth2.
The new version 2.+ of this plugin does not prevent openId anymore, but it does not support oidc discovery (yet). I close this issue as it is a little outdated.
Please feel free to create another one based on 2.x of this plugin.
from generic-oauth2.
Related Issues (20)
- Feat: Integration with trapeze to improve configuration
- Auth0 HOT 1
- Bug: Intent filter not working for redirection after login HOT 2
- Feat: Support Android 13 HOT 2
- Support for Capacitor 5 HOT 10
- Is there a way to get a login prompt? HOT 1
- Azure B2C ui_locales is directly supported via the auth request builder exception HOT 2
- I am not able to hide URL bar HOT 2
- accessTokenEndpoint quirk with django backend HOT 1
- Google with android says "Custom scheme URIs are not allowed for 'WEB' client type" HOT 3
- App Store Connect Issue
- Hide navigation bar and footer on iOS HOT 5
- Evidence of the use of safari
- Question: What kind of browser is used for login? HOT 1
- Feat: support universal links on iOS HOT 3
- Azure SSO; Response comes from azure, but does not come to authenticate
- capacitor-oauth2 - Azure SSO is not working in android and ios.Bug:
- Feat: Electron
- IOS 17 keyclock login not working
- Bug: Jest not working when using the plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generic-oauth2.