Code Monkey home page Code Monkey logo

Comments (4)

mraible avatar mraible commented on August 10, 2024

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.

mraible avatar mraible commented on August 10, 2024

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.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

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.

moberwasserlechner avatar moberwasserlechner commented on August 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.