-
Notifications
You must be signed in to change notification settings - Fork 388
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
Migrate the with-authjs example #1304
Conversation
|
0c71c8f
to
aaad022
Compare
86c2dbf
to
c26dc38
Compare
dc4d885
to
c8fb9cc
Compare
21e2781
to
4d7cc09
Compare
How's it going? Any blockers I should know about? |
I am awaiting an update to the mediakit auth package as it was on an old version of the auth.js library - will try this again soon when this recent commit hits a release solidjs-community/mediakit@446e30f |
daf1d8a
to
0fd0a85
Compare
08b3c6e
to
f2fe543
Compare
@OrJDev , i keep hitting this error with server response with Discord, even when setting the appropriate env vars: "{"client_id": ["Value "undefined" is not snowflake."]}" have you hit that before? |
Never. Im not the one who made this example, please use create jd app to create a fully working example with Solid Start & AuthJs.
|
I ran // package.json
"devDependencies": {
"@types/node": "^18.14.0",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"eslint": "^8.34.0",
"eslint-plugin-solid": "^0.9.4",
"typescript": "^4.9.5",
"vite": "^4.4.9"
},
"dependencies": {
"@solidjs/router": "^0.11.2",
"@solidjs/start": "^0.5.2",
"solid-js": "^1.8.14",
"vinxi": "^0.2.1",
"@solidjs/meta": "^0.29.3",
"zod": "^3.22.4",
"@auth/core": "0.15.0",
"@solid-mediakit/auth": "^2.0.2"
}, The url when i try to login is this:
and inside my discord dev panel the redirect url is set to: And |
redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Fdiscord It's trying to redirect to http://localhost:3000/api/auth/callback/discord So try and set it to this. Also deps could always be updated with one single command. |
Thanks, that did the trick! It was the callback/discord that i had swapped in the url |
@ryansolid , this is now finally ready as a direct port of the old example. |
Awesome thank you |
Yeah this looks way cleaner |
Yeah I will merge this. Only thing I'm unclear is how this solution works with route load functions. To be fair the context provider will be available in them it is just less clear to me the patterns here. In any case, thank you @birkskyum and @OrJDev for getting this together. This is a common question and this solution looks really clean. |
The https://mediakit-taupe.vercel.app/auth/install appear to need a bit of attention in order to fix this, but I've fixed most of the in this branch