Skip to content

remove 'guest' middleware to enable oauth account linking#544

Closed
EkiciLP wants to merge 1 commit intopelican-dev:mainfrom
EkiciLP:fix/oauth-account-linking
Closed

remove 'guest' middleware to enable oauth account linking#544
EkiciLP wants to merge 1 commit intopelican-dev:mainfrom
EkiciLP:fix/oauth-account-linking

Conversation

@EkiciLP
Copy link
Copy Markdown

@EkiciLP EkiciLP commented Aug 14, 2024

The guest middleware did not allow for authenticated users to call the /auth/oauth/redirect endpoint resulting in not being able to link an oauth account to yours.

@Boy132
Copy link
Copy Markdown
Member

Boy132 commented Aug 14, 2024

The redirect endpoint is not used for linking but for logging in.
Linking is https://github.com/pelican-dev/panel/blob/main/routes/base.php#L13-L14

For authenticated users it doesn't make sense to login again with oauth.

@EkiciLP
Copy link
Copy Markdown
Author

EkiciLP commented Aug 14, 2024

Yes but the link endpoint currently just redirects to the oauth/redirect endpoint which would fail.

@Boy132
Copy link
Copy Markdown
Member

Boy132 commented Aug 14, 2024

It doesn't. The link endpoint redirects to the oauth provider page which then redirects back to the callback endpoint.
The redirect endpoint is only used for login.

@EkiciLP
Copy link
Copy Markdown
Author

EkiciLP commented Aug 14, 2024

Ah sorry i swapped the redirect and callback endpoint in my head. The objective of this commit was for users to link their account without the frontend being done as they can't send get requests with a body using their browser.

@Boy132 Boy132 closed this Aug 15, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants