Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to customize url opening method to allow sign-in through in-app browser with cordova in amplify-js@v6 #12895

Open
1 of 2 tasks
QuentinFchx opened this issue Jan 25, 2024 · 2 comments
Assignees
Labels
Auth Related to Auth components/category feature-request Request a new feature

Comments

@QuentinFchx
Copy link

Is this related to a new or existing framework?

Angular

Is this related to a new or existing API?

Authentication

Is this related to another service?

No response

Describe the feature you'd like to request

We’re trying to add authentication through social providers (Google) in a cordova web application (written in angular).

We’re using amplify-js@v6 which removed support for the customisation of the url opening method: urlOpener

Unless we’re mistaken, Google removed the support for authentication through a webview (a while ago), thus the “hard-coded” redirection (through openAuthSession in signInWithRedirect) does not work in webview contexts.
The recommended way seems to be through an in-app browser, but we would need to retrieve the oAuthUrl first, which does not seem possible at the moment through your library.

Do you have any material documenting oAuth authentication and cordova with amplify-js@v6?
It seems you have plans regarding the signInWithRedirect method but that's all I could find, would it be possible to elaborate on this subject?

Describe the solution you'd like

We'd like to be able to configure the signInWithRedirect interaction to open an in-app browser instead.

Or at least :

  • to be able to generate the url ourselves (with the code challenge and state stored, etc...)
  • or to be able to intercept and prevent the location.hrefredirection (and open the in-app browser in userland code).

Describe alternatives you've considered

Unfortunately, we would consider other providers, such as Firebase which provides explicit Cordova guidance

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@QuentinFchx QuentinFchx added the pending-triage Issue is pending triage label Jan 25, 2024
@cwomack cwomack added feature-request Request a new feature Auth Related to Auth components/category labels Jan 25, 2024
@cwomack cwomack self-assigned this Jan 25, 2024
@cwomack cwomack removed the pending-triage Issue is pending triage label Jan 25, 2024
@cwomack
Copy link
Member

cwomack commented Jan 25, 2024

Hello, @QuentinFchx 👋. We appreciate you creating this issue and will mark it as a feature request to be reviewed with the team. I believe there may be some similar issues in the repo as well, so I'll try to link them to ensure we have broader context for how to implement this feature.

@ebk46
Copy link

ebk46 commented Aug 2, 2024

I have the same problem stopping me from upgrading to Amplify@6. We use Capacitor and need to use the Capacitor Browser for federated sign-in. The urlOpener option was critical for that. Is there any expectation that a solution for this will be provided, or is there already one I might just not know about?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auth Related to Auth components/category feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

3 participants