add github oauth
Opened this issue · 4 comments
waiting for it)
I also was trying to implement server side oauth this week with nexum but still trying. I took oauth implementation from here https://github.com/Programonaut-Blog/expense-tracker but it doesn't work because if I set coockies in login/+page.server.js than I can't access them in auth/callback/[provider]/+server.js, idk why. Will try further and will notify you on succeed.
waiting for it)
I also was trying to implement server side oauth this week with nexum but still trying. I took oauth implementation from here https://github.com/Programonaut-Blog/expense-tracker but it doesn't work because if I set coockies in login/+page.server.js than I can't access them in auth/callback/[provider]/+server.js, idk why. Will try further and will notify you on succeed.
Cool! Let me know. Maybe if you put them in a +layout.server.js file that both /login and /auth routes are children of?
no, that won't work because in Programonaut's method we redirect user to another domain's site
Anyway, I tried few another methods and found working one. I took it from here - https://dev.to/mpiorowski/oauth2-is-so-complicated-or-90-lines-of-code-with-svelte-532.
You may check differences with your Nexum code here: all-mute/job-ninja@5ec6be9#diff-0bc676db62290461fc5907797000085c1b109a7ef47c5f0751bf0ca74833fd34
Hope it will work! I will pr after some time. Should I do it into original nexum or into spatz?
Thanks for the link, I will give this a try tonight.
As far as PRs, I would say spatz as it's leaner than nexum, plus it's typescript. I would like for spatz to be a universal starting point for building apps fast. However, I'll happily merge any improvements to either nexum or spatz repos. 😊