openid / AppAuth-Android

Android client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
https://openid.github.io/AppAuth-Android
Apache License 2.0
2.87k stars 887 forks source link

Clarification on Manifest Registration for RedirectUriReceiverActivity in AppAuth-Android #1089

Closed this-Aditya closed 1 month ago

this-Aditya commented 1 month ago

Configuration

Description

I am using the AppAuth-Android library to build a plugin that supports the OAuth flow. This library is integrated into another library because I need to meet certain requirements for my app, which currently supports its own flow and is now extending that support to include OAuth.

To clarify, I am using the AppAuth-Android library within a plugin, such as oAuth2-login-manager, which is then utilized by my Android application. My question is: do I need to register net.openid.appauth.RedirectUriReceiverActivity again in the AndroidManifest file, complete with the intent filters and URI scheme, or is this step unnecessary? I have noticed that some tutorials and documentation explicitly mention this requirement, while others do not.

If registration is indeed necessary, could you please advise where I should place this declaration? Should it go in the manifest file for the library I am creating, or in the Android app's manifest?

Additionally, I am defining the appAuthRedirectScheme in the main application’s app/build.gradle file rather than declaring it in the library. Is this the correct approach?

this-Aditya commented 1 month ago

Got the solution -- we need to use the tag tools:node="replace" and then can define a new activity tag in manifest.