Skip to content

feat: use new login scheme which supports Safari#375

Merged
roncohen merged 5 commits intomainfrom
new-oauthish-login
Mar 14, 2025
Merged

feat: use new login scheme which supports Safari#375
roncohen merged 5 commits intomainfrom
new-oauthish-login

Conversation

@roncohen
Copy link
Contributor

@roncohen roncohen commented Mar 13, 2025

This authentication flow does not use a fetch request to http://localhost but instead redirects there. We don't want to pass the actual access token along so it becomes part of the browser history. Instead we supple a code which is then exchanged for the actual access token through a new API endpoint in the backend.

This starts to look very much like a standard oauth flow. The key missing piece is come client_id parameters. I'm making the new server endpoints live under /api/oauth/cli so that when we do introduce propert oauth there will be no clashes.

I removed the spinner on login because it indicates that it's working when in reality it's waiting for you to do something. I'm also printing out the URL in case opening of the browser doesn't work.

@roncohen roncohen requested a review from Swiftwork March 13, 2025 13:20
@roncohen roncohen merged commit c106b8c into main Mar 14, 2025
5 checks passed
@roncohen roncohen deleted the new-oauthish-login branch March 14, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants