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

Upgrade to Remix Auth v4 and use Arctic's OAuth2Client #137

Merged
merged 6 commits into from
Nov 25, 2024

Conversation

sergiodxa
Copy link
Owner

@sergiodxa sergiodxa commented Nov 24, 2024

This PR does two things

  1. It upgrade the strategy to work with Remix Auth v4, the strategy uses @mjackson/headers to work with cookies and accepts an optional cookie configuration that fallbacks to oauth2, this cookie is used as the name of the cookie the strategy will use to keep the state and code verifier.

The cookie can also be an object to customize path, maxAge, secure, httpOnly, etc.

  1. It change how it works internally to use the new Arctic's OAuth2Client, this way the strategy just instantiate the client and coordinate with the request->response flow how to read from the URL and cookies and how to direct, but the actual logic for OAuth2 is on the client.

This has a side-effect that now an identity provider that doesn't really follow the spec will not work, for those is better to create a custom strategy.

@sergiodxa sergiodxa self-assigned this Nov 24, 2024
@sergiodxa sergiodxa added the enhancement New feature or request label Nov 25, 2024
@sergiodxa sergiodxa merged commit b99bccf into main Nov 25, 2024
5 checks passed
@sergiodxa sergiodxa deleted the upgrade-remix-auth-v4-artic branch November 25, 2024 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant