openid / AppAuth-Android

Android client SDK for communicating with OAuth 2.0 and OpenID Connect providers.

Home Page:https://openid.github.io/AppAuth-Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect documentation I think

mjaggard opened this issue · comments

Checklist:

  • I am using the latest release
  • I searched for existing GitHub issues
  • I read the documentation
  • I verified the client configuration matches the information in the identity provider (or I am using dynamic client registration)
  • I am either using a custom URI scheme or https with App Links for client redirect.
  • I can reproduce the issue in the demo app (optional)

Configuration

  • Version: N/A
  • Integration: ReactNative
  • Identity provider: Google Android

Issue Description

The documentation says

We recommend using a custom scheme based redirect URI (i.e. those of form my.scheme:/path), as this is the most widely supported across all versions of Android. To avoid conflicts with other apps, it is recommended to configure a distinct scheme using "reverse domain name notation". This can either match your service web domain (in reverse) e.g. com.example.service or your package name com.example.app or be something completely new as long as it's distinct enough. Using the package name of your app is quite common but it's not always possible if it contains illegal characters for URI schemes (like underscores) or if you already have another handler for that scheme - so just use something else.

However if you enter something other than your package ID, you cannot specify the redirect URL correctly when creating Google's Android-specific credentials.