spatz icon indicating copy to clipboard operation
spatz copied to clipboard

add github oauth

Open engageintellect opened this issue 1 year ago • 4 comments

Docs

https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps

Example

https://github.com/rajesh6161/pocketbase-oauth-demo

engageintellect avatar Apr 27 '24 07:04 engageintellect

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.

all-mute avatar May 04 '24 15:05 all-mute

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?

engageintellect avatar May 04 '24 20:05 engageintellect

@engageintellect

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: https://github.com/all-mute/project-flexin/commit/5ec6be9eb20d345fd3b1f4d1bd28a73ff93ef97a#diff-0bc676db62290461fc5907797000085c1b109a7ef47c5f0751bf0ca74833fd34

Hope it will work! I will pr after some time. Should I do it into original nexum or into spatz?

all-mute avatar May 05 '24 12:05 all-mute

@all-mute

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. 😊

engageintellect avatar May 06 '24 03:05 engageintellect