Setting up the Session Cookie on User's Browser

Hello,
I am trying to figure out the solution to create a cookie on the user’s browser using Session Token received by calling the Authentication API from my .Net MVC application.

I m trying to use this method for setting up the cookie in User’s browser.
" Retrieving a session cookie via OpenID Connect Authorization Endpoint"
https://developer.okta.com/docs/guides/session-cookie/overview/#retrieving-a-session-cookie-via-openid-connect-authorization-endpoint

The request syntax is:
https://$XXXXXXX.oktapreview.com/oauth2/v1/authorize?client_id={clientId}&response_type=id_token&scope=openid&prompt=none&redirect_uri=https%3A%2F%2Fyour-app.example.com&state=Af0ifjslDkj&nonce=n-0S6_WzA2Mj&sessionToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Can someone please advise or share a sample code which does this ?
My application is MVC .Net application.

I would like to achieve 2 things.

  1. Set the cookie in the User’s browser for SSO purpose
  2. Validate the login Session on all the pages of the application until User is logged in.

Thank you in advance for your time.

We can help you!
Please visit https://co-well.vn

Hi @jaynishp

You can also check https://github.com/okta/samples-aspnet/tree/master/self-hosted-login

Hi @eddienguyen123,
This link is not working. Can you please check?

Thanks

Hi @dragos,
Thank you for sharing this. We will look into this and will get back to you if any questions.

Hi @jaynishp, please try again, our site is now available! Thank you so much!