Add Single Sign-On (SSO) to a Node app in 8 MINUTES

Add Single Sign-On (SSO) to a Node app in 8 MINUTES

HomeLearn With JasonAdd Single Sign-On (SSO) to a Node app in 8 MINUTES
Add Single Sign-On (SSO) to a Node app in 8 MINUTES
ChannelPublish DateThumbnail & View CountDownload Video
Channel AvatarPublish Date not found Thumbnail
0 Views
Subscribe: https://lwj.dev/newsletter — Many developers (like me!) are intimidated by enterprise features like Single Sign-On (SSO), but the tools are MUCH better now. You can quickly add it to SaaS apps!

This tutorial describes how to add single sign-on to a Node.js app built with Fastify (very similar to Express – the same concepts and most of the same code apply). WorkOS supports the SSO flow and Okta is used as the identity provider (IdP) so customers can manage who on their team has access to apps in a single place.

Features like SSO may seem daunting, but they're a necessity if you're looking to sign enterprise contracts worth over $100,000. With WorkOS, you can quickly add single sign-on and a whole host of other features to get your SaaS app ready for enterprise contracts.

Thanks to WorkOS for making this video possible. Open your account at https://lwj.dev/workos

Resources & Links:
– Source code: https://github.com/learnwithjason/workos-six-figure-saas-contracts
– WorkOS docs for setting up SSO: https://workos.com/docs/sso
– Okta Developer Edition: https://developer.okta.com/signup/
– Fastify (Express alternative for Node.js): https://fastify.dev/

Chapter:
0:00 Why large customers ask for SSO support
0:47 Add a redirect URI to WorkOS
1:05 Create an organization in WorkOS
1:26 Configure Single Sign-On (SSO) in WorkOS
1:38 Add an app integration in Okta
2:36 Add the Okta metadata URL to WorkOS
2:49 How to grant employees access to SSO-enabled apps in Okta
3:25 Adding SSO support to a Node.js app
3:47 Setting environment variables
4:33 Add a login route and SSO flow handling
5:14 Processing redirect URI calls
5:48 Test the registration
6:03 Enable sessions to store user data
6:30 Save user data in the session and redirect to the home page
7:05 A valid user session is required to view the dashboard
7:22 Handling logout
7:44 Summary and next steps

Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.