Questions tagged [appauth]

Tag for the AppAuth library. Use in conjunction with a platform specific tag like `ios`, `android` or `electron`.

AppAuth is an SDK for native applications that facilitates interaction with OAuth2 and OpenID Connect authorization servers. Platform specific libraries are available for Android, iOS and JS-based environments like Node and Electron.

AppAuth follows the current best practice for federated authentication and authorization in native apps. This includes:

  • Using in-app browser tabs for user interaction, when available, such as Chrome Custom Tabs on Android, and SFSafariViewController on iOS.
  • Support for both custom scheme and [universal link][universal-link] / [app link][app-link] redirect URIs.
  • Support for PKCE, a standardized authorization code protection scheme.

The code is open source (Apache2) and are maintained by the OpenID Foundation.

Homepage: https://appauth.io/
Android library: https://github.com/openid/AppAuth-Android
iOS library: https://github.com/openid/AppAuth-iOS
JS library: https://github.com/openid/AppAuth-JS

188 questions
5
votes
1 answer

AppAuth library - how the heck do we refresh tokens?

I'm having basically the same problem as the user asking this question: AppAuth library for Android lacks proper documentation. My problem occurs when the current access token expires, disallowing API communication from inside my app. To prevent…
Calamity
  • 700
  • 7
  • 23
5
votes
2 answers

How to do a secure logout with Auth0 using Flutter?

I have followed this article on how to get started with using Auth0 in Flutter. The author writes: "...a complete secure logout is beyond the scope of this article". The logout method from the article is this: void logoutAction() async { await…
Daniel
  • 546
  • 6
  • 17
5
votes
0 answers

App Auth crash when unarchiving AuthState

I'm implementing the App Auth library in my iOS app, and trying to clean up a couple warnings when archiving the Auth State. 'unarchiveObject(with:)' was deprecated in iOS 12.0: Use +unarchivedObjectOfClass:fromData:error:…
Dennis Calla
  • 839
  • 9
  • 10
5
votes
1 answer

Cannot get control back from web view to react native app in OAuth flow

I'm trying to implement Google OAuth 2 signin using FormidableLab's react-native-app-auth library in my react native android application as shown below: googleLoginPressed = async () => { const config = { serviceConfiguration: { …
Rakesh Singh
  • 858
  • 1
  • 12
  • 31
5
votes
1 answer

AppAuth/OpenID-Connect: Login with username and password possible?

I want to implement login via OpenID-Connect in an iOS App. The AppAuth-SDK seems to be the standard way to do so. After downloading some examples I am a little bit confused. All AppAuth examples and tutorials are working with a WebView in which the…
irk
  • 51
  • 2
5
votes
0 answers

OpenID AppAuth and Custom Tabs - never uses custom tabs, always external browser - why?

I am using the AppAuth library and I want it to use custom tabs but it never does on the emulator with play store support or on my device which is an HTC U11 running Oreo. Chrome is installed. I have tried a bunch of configurations but no luck. …
Kevin
  • 1,405
  • 15
  • 16
5
votes
0 answers

Getting SSL Exception in App auth

I am getting the below error when trying to hit the App auth url. E/AppAuth: Network error when retrieving discovery document. javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path…
Manu Ram V
  • 369
  • 1
  • 3
  • 23
4
votes
1 answer

OAuth redirect with an App Link not working occasionally

We have an app that uses a OAuth 2.0 for login. In our app, we're using AppAuth-Android to implement this flow. As a redirect URI, we're using an HTTPS scheme link - https://example.com/oauthRedirect, and added a digital asset links file at…
Jyot Patel
  • 41
  • 2
4
votes
1 answer

Flutter AppAuth: Is there a way to hide the url address and the bottom navigation bar when launch url in app?

I'm looking into a way to make a better native feel for my flutter project. Is it possible to customize the safari launch view inside the flutter app, in a way I could hide the url, refresh button along with the bottom navigation bar? This is how it…
Tien Thai
  • 41
  • 3
4
votes
0 answers

Alternative to AppAuth?

I want to integrate OAuth2 / OpenID Connect in my app. I intended to use AppAuth for that, but it seems to have a potentially missing maintainer. What alternatives are there?
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
4
votes
3 answers

Invalid redirect_uri IdentityServer4 and AppAuth

I'm using the IdentityServer template that comes with asp.net core 3.1. So far so good, the SPA app works with the implicit flow. Now I have a mobile application that I want to use with the same identity server. So in appsettings.json i added a new…
Yehia A.Salam
  • 1,987
  • 7
  • 44
  • 93
4
votes
1 answer

How to fix "Activity has leaked ServiceConnection net.openid.appauth.browser.CustomTabManager$1@41fb56d0 that was originally bound here" error

I am setting up my android application to use authentication and I am following the documentation on AppAuth for Android. So far I have been able to connect and make a request to the identity server and gotten back a response containing most of data…
4
votes
3 answers

Azure AD B2C login - "contains script errors preventing it from being loaded"

I followed this sample app from Integrate Azure AD B2C into an Android application and replaced the configuration parameters for my Azure AD B2C tenant, however I got the errors "contains script errors preventing it from being loaded This is the URL…
troubledsoul
  • 69
  • 1
  • 10
4
votes
1 answer

Does Redirect URI provide security in OAuth implementation for native Mobile Application?

I am developing a native mobile application on Android which has to interact with a server with oAuth2.0 implementation and using the Google AppAuth library as explained here. 1) What is the purpose of Redirect URI other than getting Authorization…
Vishu Gupta
  • 611
  • 5
  • 10
3
votes
1 answer

Android Kotlin openid AppAuth registerForActivityResult not being called

Using openid AppAuth for login, registerForActivityResult is not called after the successful login, it stops on the login page itself. Expecting : After successful login the web page should close and redirect to calling Activity. Below is sample…
user2000244
  • 111
  • 2
  • 5
1
2
3
12 13