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

fix redirect issue on Android #13637

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

geovannifuentesQred
Copy link

@geovannifuentesQred geovannifuentesQred commented Jul 24, 2024

Description of changes

Allow the ability to skip the redirect url validation and use the first redirect url instead.

Issue #, if available

Description of how you validated changes

I enabled this for Android and I could verify that uses the first redirect url and skips http/https validation.
This is needed since Chrome Custom Tabs does not allow to redirect back into the app.
Our solution includes a custom web page that redirects back to the app automatically and we need to setup both redirect urls.

Checklist

  • PR description included
  • yarn test passes
  • Relevant documentation is changed or added (and PR referenced)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@geovannifuentesQred geovannifuentesQred requested a review from a team as a code owner July 24, 2024 12:09
@Samaritan1011001
Copy link
Member

Samaritan1011001 commented Aug 2, 2024

Hi @geovannifuentesQred, thank you for opening this PR. I would like to understand the use-case a little more.

This is needed since Chrome Custom Tabs does not allow to redirect back into the app.
From my understanding you should be able to redirect back to the app.

  1. Are you saying it's a Custom Tabs limitation?
  2. Are you using web links or Android app links?

Our solution includes a custom web page that redirects back to the app automatically and we need to setup both redirect urls.

Can you expand on this? Why would a custom web page be needed in the middle?

@geovannifuentesQred
Copy link
Author

geovannifuentesQred commented Aug 7, 2024

Hi @Samaritan1011001, thank you for replying.
We were trying to use both Web Links and App Links but there's a restriction in the Amplify SDK for https as redirect urls.
Using a custom web page allows us to redirect back to app since we are using Signicat and the redirect they are doing is based on form action. The redirect fails because of Content Security Policy. This issue only happens when using Chrome (Custom Tabs) but not on Firefox.
Ideally we would like to use App Links but we are restricted by the SDK right now.

@cwomack cwomack added feature-request Request a new feature Auth Related to Auth components/category need-product-input Needs non-technical requirements or direction to proceed labels Sep 24, 2024
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 need-product-input Needs non-technical requirements or direction to proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants