Skip to main content
Correcting wording
Source Link

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an API and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some OAuth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with passportjs) you can use Single Sign On-On (SSO), and you redirect your user where the application lives (example: POST sso.example.com) to get session JWT and redirect to the application so the cookie set into the right domain. Also if you need information about the user you andmake a POST request to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch the user's information.

Some useful links with other industry techniques:

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an API and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some OAuth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with passportjs) you can use Single Sign On (SSO), and you redirect your user where the application lives (example: POST sso.example.com) to get session JWT and redirect to the application so the cookie set into the right domain. Also if you need information about the user you and POST to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch user's information.

Some useful links with other industry techniques:

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an API and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some OAuth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with passportjs) you can use Single Sign-On (SSO), and you redirect your user where the application lives (example: POST sso.example.com) to get session JWT and redirect to the application so the cookie set into the right domain. Also if you need information about the user you make a POST request to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch the user's information.

Some useful links with other industry techniques:

improved formatting with embedded links
Source Link
Glorfindel
  • 3.2k
  • 6
  • 28
  • 34

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an apiAPI and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some oauthOAuth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with passportjs) you can use Single Sign On (SSO), and you redirect your user where the application lives (example: POST sso.example.com) to get session jwtJWT and redirect to the application so the cookie set into the right domain. Also if you need information about the user you and POST to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch user's information.

Some useful links with other industry techniques:

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an api and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some oauth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with passportjs) you can use Single Sign On (SSO), and you redirect your user where the application lives (example: POST sso.example.com) to get session jwt and redirect to the application so the cookie set into the right domain. Also if you need information about the user you and POST to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch user's information.

Some useful links with other industry techniques:

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an API and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some OAuth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with passportjs) you can use Single Sign On (SSO), and you redirect your user where the application lives (example: POST sso.example.com) to get session JWT and redirect to the application so the cookie set into the right domain. Also if you need information about the user you and POST to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch user's information.

Some useful links with other industry techniques:

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an api and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some oauth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with http://www.passportjs.org/) you can use https://auth0.com/docs/sso?_ga=2.227010072.424646326.1609872945-5 14458386.1606333985 Single Sing On (SSO)Single Sign On (SSO), and you redirect your user where the application lives, example: POST sso. (example.com: POST sso.example.com) to get session jwt and redirect to the application so the cookie set into the right domain. Also if you need information about the user you and POST to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch user's information.

Some useful links with other industry techniques:

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an api and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some oauth authentication process, or is just as simple as user and password, but in case you are using oauthv2 (you can set up your own server with http://www.passportjs.org/) you can use https://auth0.com/docs/sso?_ga=2.227010072.424646326.1609872945-5 14458386.1606333985 Single Sing On (SSO) and you redirect your user where the application lives, example: POST sso.example.com to get session jwt and redirect to the application so the cookie set into the right domain. Also if you need information about the user you and POST to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch user's information.

Some useful links with other industry techniques:

So if I understand it well, I think the third approach with a reverse proxy to paths may be enough to share the authentication in the domain (in the short term), like you have an api and get session token in the same application but it adds a ton of complexity.

Nevertheless, you may want to step ahead in your development and keep only one authentication so, I don't know if you are using some oauth authentication process, or is just as simple as user and password, but in case you are using oauthv2, (you can set up your own server with passportjs) you can use Single Sign On (SSO), and you redirect your user where the application lives (example: POST sso.example.com) to get session jwt and redirect to the application so the cookie set into the right domain. Also if you need information about the user you and POST to sso.example.com to get details of the logged user.

Note: be careful to encrypt the cookie and DO NOT send user information inside it, better to make another call to fetch user's information.

Some useful links with other industry techniques:

Source Link
Loading