Before Posting, I have gone through okta documents about redirect URIs but I still need some clarification.
I have an application where we are building a whole new custom login page (Not using OKTA widget). We have our users available in Okta and we are planning to use OKTA backend APIs for authentication. As per okta documents, Once the user clicks login after entering credentials , I have to first get the session token and then authroization code and then finally access token. I was able to get the session token using the API but I dont know how to get authroization code. the document says the authroization code will be sent to the redirect URI. I dont have any idea how to retireve the authroization code using redirect URI. Lets say I have my application running on http://localhost:3006/login.
On click of login, I make api call to OKTA to get session token and then I have to make another api call to Authroize end point using the session token, will i receive the authroization code as part of response or do I need to do something else to retrieve the token?? As I am relatively new to OKTA I am completely clueless on how to retrieve the authroization code from OKTA and I am stuck. Any help would be greatly appreciated. Thanks in Advance !!!