Title: Trouble with Okta SSO Authentication and Google Site Access
Issue:
I am trying to authenticate users via Okta using SSO (SAML) and then access Google Sites. I’m using Postman to test this flow, but I’m encountering issues in the process. Manually using Browser, I am able to Login to Okta and then access Google Site but I want to do that same but using code. Steps that I am following:
Steps I have Taken:
- Obtain Okta Session Token:
- Endpoint: https://{yourOktaDomain}/api/v1/authn
- Method: POST
- Headers: Content-Type: application/json
- Body: json { “username”: “your_username”, “password”: “your_password” }
- Result: Successfully received sessionToken.
- Obtain Okta Session ID (SID):
- Endpoint: https://{yourOktaDomain}/api/v1/sessions
- Method: POST
- Headers: Content-Type: application/json
- Body: json { “sessionToken”: “your_session_token” }
- Result: Successfully received id (SID).
- Initiate SSO Authentication:
- Endpoint: https://{yourOktaDomain}/app/google/{app-id}/sso/saml
- Cookie: “sid:session-id”
- Method: GET
- Result: The response in Okta Login Page
Where I Need Help:
How can I correctly using SID and use it to SSO Google?
Any help or guidance on properly handling this authentication flow would be greatly appreciated. Thank you!