question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

authorize() caches credentials

See original GitHub issue

Issue

IOS+Android issue. authorize() automatically logs users in WITHOUT ASKING FOR CREDENTIALS (for the 2nd time)


Environment

  • Your Identity Provider: IdentityServer 4
  • Platform that you’re experiencing the issue on: both
  • Are you using Expo? No
  • “react-native-app-auth”: “^6.2.0”,

System: OS: macOS 10.15.7 CPU: (12) x64 Intel® Core™ i9-8950HK CPU @ 2.90GHz Memory: 307.18 MB / 32.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.13.1 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.8 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /Users/myusername/.rvm/rubies/ruby-2.6.3/bin/pod SDKs: iOS SDK: Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1 Android SDK: API Levels: 16, 23, 27, 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2 System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom Android NDK: 21.3.6528147 IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 12.2/12B45b - /usr/bin/xcodebuild Languages: Java: 1.8.0_222 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2

const OAuthConfig: AuthConfiguration = {
  serviceConfiguration: {
    authorizationEndpoint: 'https://id.myserver.com/oauth2/authorize',
    tokenEndpoint: 'https://id.myserver.com/oauth2/token/',
    revocationEndpoint,
  },
  clientId: 'MY_CLIENT_ID',
  clientSecret: 'MY_CLIENT_SECRET',
  redirectUrl: 'myApp://oauth',
  scopes: ['introspection', 'profile:read'],
  additionalParameters: { prompt: 'login' },
}

If I logout, for the next login I’m not asked to enter credentials and I’m being logged in automatically. We don’t want this to happen - instead we want to ask user enter credentials every time

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:18

github_iconTop GitHub Comments

10reactions
RoBYCoNTecommented, Jul 5, 2021

My update After few research I’ve discovered this ISSUE related to OIDC: https://github.com/openid/AppAuth-iOS/issues/542

I’ve seen this ISSUE and @kuznetsov-from-wonderland has this parameter in his configuration, I’m referring to this: additionalParameters: { prompt: 'login' },

I’ve added this to my OIDC configuration and I can confirm that everything is working OK. I’m able to execute login/logout with re-entering credentials. Hope my experience can help you too.

My configuration:

  • react-native 0.64.1
  • react-native-app-auth 6.3.0
1reaction
chefk5commented, Sep 3, 2021

@RoBYCoNTe solution fixed the issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Credentials Processes in Windows Authentication
Learn about how Windows authentication processes credentials. ... Cached credentials are disabled, and a Remote Access Services connection ...
Read more >
Credential caching question - JBoss.org
I want to let the user know that they have authenticated but failed authorization and to trying logging in with another username and...
Read more >
How to store basic auth credentials in browser cache after XHR
headers: { 'Authorization': 'Basic ' + auth_basic } // send auth header ... I have no cookie showLoginForm() } else { getData(auth_cookie) }....
Read more >
Authentication cache settings - IBM
Security information pertaining to beans, permissions, and credentials is cached. When the cache timeout expires, all cached information not ...
Read more >
Authorize googlesheets4 — gs4_auth • googlesheets4
By default, with your permission, these user credentials are cached in a folder below your home directory, from where they can be automatically...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found