Skip to content

Redirect to root route if logged in#37120

Merged
avatus merged 2 commits intomasterfrom
avatus/login_redirect
Jan 24, 2024
Merged

Redirect to root route if logged in#37120
avatus merged 2 commits intomasterfrom
avatus/login_redirect

Conversation

@avatus
Copy link
Copy Markdown
Contributor

@avatus avatus commented Jan 23, 2024

Fixes #19662
e buddy: https://github.com/gravitational/teleport.e/pull/3225

This adds a check if the current session is valid and if so, will not render the Login page. instead, it will redirect to the root path.

The check itself is quite shallow, as in, it doesn't perform any network requests and only checks the token. This does not replace any of the other authentication checks on our authenticated paths.

changelog: The login screen will no longer be rendered for authenticated users

@avatus avatus enabled auto-merge January 24, 2024 19:28
@avatus avatus added this pull request to the merge queue Jan 24, 2024
Merged via the queue into master with commit 0ff8da8 Jan 24, 2024
@avatus avatus deleted the avatus/login_redirect branch January 24, 2024 22:05
@public-teleport-github-review-bot
Copy link
Copy Markdown

@avatus See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Create PR
branch/v15 Create PR

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Web UI] Users who are already logged in should be redirected away from the login page if they navigate to it

3 participants