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

Let the platform login control user login/register flow #34990

Open
CodeWithEmad opened this issue Jun 14, 2024 · 0 comments · May be fixed by #34995
Open

Let the platform login control user login/register flow #34990

CodeWithEmad opened this issue Jun 14, 2024 · 0 comments · May be fixed by #34995

Comments

@CodeWithEmad
Copy link
Member

Forcing users to go to Authn MFE results in a bad UX. We need to let the platform decide on login and registration.
Imagine this scenario: you have a TPA setup and want users to log in there directly. you can have this by adding "THIRD_PARTY_AUTH_HINT": "some-provider-slug" and if users go to /login it redirects them to the TPA login/registration page but the current logic takes users to the Authn MFE and they need to know that they have to click on another button which results in a bad UX!

% if should_redirect_to_authn_mfe:
<div class="mobile-nav-item hidden-mobile nav-item">
<a class="register-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/register${login_query()}">${_("Register for free")}</a>
</div>
% else:
<div class="mobile-nav-item hidden-mobile nav-item">
<a class="register-btn btn" href="/register${login_query()}">${_("Register for free")}</a>
</div>
% endif
% endif
% if should_redirect_to_authn_mfe:
<div class="mobile-nav-item hidden-mobile nav-item">
<a class="sign-in-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/login${login_query()}">${_("Sign in")}</a>
</div>
% else:
<div class="mobile-nav-item hidden-mobile nav-item">
<a class="sign-in-btn btn" href="/login${login_query()}">${_("Sign in")}</a>
</div>
% endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants