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

@auth/remix framework for using @auth in remix #6767

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

acoreyj
Copy link
Contributor

@acoreyj acoreyj commented Feb 20, 2023

☕️ Reasoning

Integrate auth.js into a remix project

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

Note this is working in my testing but setup a good example project and merge I need at least the first and preferably both of the following remix issues fixed/merged

remix-run/remix#4148
remix-run/remix#3330

But I'm reopening this MR because some people have expressed interest in using the code

📌 Resources

@vercel
Copy link

vercel bot commented Feb 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ❌ Failed (Inspect) Sep 9, 2024 4:15pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Sep 9, 2024 4:15pm

@balazsorban44
Copy link
Member

Thank you! Small note, we are still very much interested, but our priority is on making the core more stable and finishing up the docs migration (https://next-auth.js.org and https://authjs.dev have a lot of shared content right now).

Once that's done, we will have more time to look into new frameworks again! 💚

In the meantime, I was wondering about your opinion on this comment by @sergiodxa: #6246 (reply in thread), considering that there is https://remix.run/docs/en/v1/utils/sessions

@acoreyj
Copy link
Contributor Author

acoreyj commented Feb 22, 2023

Thank you! Small note, we are still very much interested, but our priority is on making the core more stable and finishing up the docs migration (https://next-auth.js.org and https://authjs.dev have a lot of shared content right now).

Once that's done, we will have more time to look into new frameworks again! 💚

In the meantime, I was wondering about your opinion on this comment by @sergiodxa: #6246 (reply in thread), considering that there is https://remix.run/docs/en/v1/utils/sessions

No problem, it seems silly to merge it when that remix bug means you have to use a patch and for some reason they still haven't merged in the fix.

But yes I agree it would be easier to work with remix if it didn't return a response object and just the info you needed to create the response. Not even mainly to use the built in remix session storage methods, although that could be especially nice for things like cloudflare. But mainly after playing with it a lot and the best way to integrate it, is as I lay out in the README, is using a fetcher.Form and you are basically ignoring the html of the response but of course you need the set-cookie.

This ends up working fine for most things as if it succeeds you can easily show they are signed in. But for errors you can tell it encountered an error via the response code but would need to parse the html response to see if it's something you want to tell the user like if the email already exists in the database.

Also it becomes a pain for strategies that succeed but don't log the user in like with email magic links.

@Guria
Copy link

Guria commented Aug 9, 2024

@acoreyj just a ping reminder. Is it possible to finish the work you have started here? Do you have an y plans for that?

@voltuer
Copy link

voltuer commented Aug 27, 2024

@acoreyj now that Remix moved to Vite, is this more feasible to become a reality?

@acoreyj
Copy link
Contributor Author

acoreyj commented Sep 4, 2024

@voltuer @Guria

I can make sure this is working with the latest Remix. Although a bit confused on what Remix is to become as it is merging with React Router so not clear if this makes sense in that context

@ndom91
Copy link
Member

ndom91 commented Sep 7, 2024

@voltuer @Guria

I can make sure this is working with the latest Remix. Although a bit confused on what Remix is to become as it is merging with React Router so not clear if this makes sense in that context

Yeah it'd be great if you could double check this against the latest versions of Remix!

The way I see it, I can't imagine the framework will disappear in any sense. Shopify bought them as replacement for their homegrown framework and as a competitor to Vercel/next, netlify/gatsby, etc.

Copy link

vercel bot commented Sep 9, 2024

@acoreyj is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@ndom91
Copy link
Member

ndom91 commented Sep 10, 2024

You shouldn't touch the package.json version manually. Just set it to 0.0.1, for example, for the first release. And then once released, subsequent updates are automatically bumped by our CI tooling

@voltuer
Copy link

voltuer commented Sep 16, 2024

@voltuer @Guria
I can make sure this is working with the latest Remix. Although a bit confused on what Remix is to become as it is merging with React Router so not clear if this makes sense in that context

Yeah it'd be great if you could double check this against the latest versions of Remix!

The way I see it, I can't imagine the framework will disappear in any sense. Shopify bought them as replacement for their homegrown framework and as a competitor to Vercel/next, netlify/gatsby, etc.

@ndom91 thanks but i decided to use Next, but if I ever try Remix again in the future I'll try it out

@okalil
Copy link

okalil commented Nov 3, 2024

Maybe the name should change to '@auth/react-router' because Remix will be merged into the upcoming React Router 7

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.

7 participants