Using External Vercel Authentication Server!! | Svelte | SvelteKit | Vercel

Опубликовано: 11 Октябрь 2024
на канале: Consulting Ninja
574
17

I wanted to make sure I show how to use the authentication server from another video    • Authentication Server up in 30 minute...  . In THIS video I show how to modify our previously put together refresh tokens code to instead make use of our external authentication server (best practice when using refresh tokens). We create an extremely short lived communications token that the server is expecting to verify communications between the servers. We then put that token into a custom header and send it to our authentication server. Using regular javascript we parse the cookies out from the set-cookie headers to create cookies in our application which can then be made use of in our hooks file to check for authentication and set locals. I also modify that hooks file to enable it to send the refresh token to the authentication server every time the access token is gone to attempt to automatically generate a new access token! I hope you find this helpful!

My channel membership is live check it out here!:
   / @consultingninja  

Membership perk video:
   • I launched a chatbot with my channel ...  

Need help? visit https://www.consultingninja.tech
Check out my channel ‪@ConsultingNinja‬ for more videos like these.

Completed Source Code here:
https://github.com/consultingninja/re...

Starting Source Code here:
https://github.com/consultingninja/re...

Authentication Server Source code here:
https://github.com/consultingninja/re...

Refresh Video:
   • Implement Refresh Tokens Today!  #aut...  

Auth Server Video:
   • Authentication Server up in 30 minute...  

Authentication video here:
   • Svelte | #authentication using JWT , ...  

Register Form video here:
   • Svelte | Real world register form exa...  

Mongodb Docker setup video here:
   • mongodb | docker & cloud setups  

Setup Env File Video here:
   • SvelteKit | $env module | how to use ...  

Hookup Mongodb to SvelteKit video here:
   • SvelteKit | Mongodb connect | using p...