In AWS Amplify UI React after Login how to redirect to dashboard path login button in home page in react in different page

0

In AWS Amplify UI React after Login how to redirect to dashboard path login button in home page in react in different page

gefragt vor 2 Jahren2911 Aufrufe
1 Antwort
0

Hello,

Based on the information shared it sounds like after a user logs in on https://example.com, you want to make sure that the user is redirected to https://www.example.com/dashboard.

What you can do is update your Amplify auth resource with amplify update auth on the Amplify CLI and:

1.) Update it to use an OAuth flow and

2.) Change your redirect URI to be https://www.example.com/dashboard. If you use Auth.federatedSign() to redirect the user to the Cognito hosted UI from the homepage (or construct the link to the Cognito hosted UI and apply it to the login button: https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html), then when the user signs in, Cognito will redirect them to the /dashboard page automatically.

AWS
SUPPORT-TECHNIKER
Tim_P
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen