Using the access token to authenticate the second app


This is a sso setup.Our requirement is if the user exists in OKTA, authenticate the user, generate token and authenticate on app A. User open app B and by using the session token in the cookie or the access Token he is able to authenticate himself/herself on app B
I am using the authorization code flow and I may be approaching the problem in a wrong way
These are the steps I was trying before.
1.authenticate user with /api/v1/authn call
2. generate token using /oauth2/v1/authorize. since this is returning html response,so I can’t use this but for now this saves the token in my local storage.

Will be great if I can conquer this newbiness on Okta with your help.

What is the error you are seeing?

Hi Erin,

I am able to get access tokens and Id token but my question is that I want to provide sso capability to multiple apps.After authentication on one app , how do I sign in to other app on my local setup. Will both the apps have to be registered on the okta(both as web ). Does it require me to edit any configuration on okta dashboard? Does it happen with redirectWithPrompt but that only redirects to the configured path on one app. How do I make sure to the second app signing in?

Note:- I am making use of authorization code flow. Sorry If I sound like a novice