Hi, I'm currently trying to get my head around Authenticated Messaging. I have followed the sample code provided by @tim.smith from here but I keep looping back to the Okta Login screen with the following error:
Auth Error Failed to identify user for token: f3cxxxxxxxxxxxcdc0 deploymentId: 311xxxxxx-xxxxx-xxxxx-xxf2 localhost:8080:555:14
From the sample code (as indicated by the error - line 555) I can see this appears to be an error coming from GC. My Okta logs show no errors and the user is authenticated successfully. Does anyone know what might be going on? Have I configured something incorrectly in GC? I can't even get the sample Buleprint code to run from the sample Blueprint Repo - it fails too.
Digging into it a bit more I've tried running the sample code locally with breaks so I can see more. It appears the error message I am seeing is due to a 401 error calling this URL on GC....
Cheers. FYI - done a lot more investigation and found the following...
Call to login to Okta works fine. 'code' is returned and I can use the returned code to manually call https://dev-56993126.okta.com/oauth2/default/v1/token and receive back id tokens. So no issue with Okta setup.
AuthProvider plugin (my code) is successfully registered with the messenger plugin along with the 'getAuthCode' function.
When I tell messenger that the 'AuthProvider' is setup and ready to use ('AuthProvider.ready();') this then triggers the call to the https://api.mypurecloud.com.au/api/v2/webdeployments/token/oauthcodegrantjwtexchange API. I understand this should then request the tokens using the code/nonce/returnURL suppplied by the AuthProvider.getAuthCode call executed by Genesys' 'Auth' plugin.
The 'Auth' plugin seems to sucessfully call the https://api.mypurecloud.com.au/api/v2/webdeployments/token/oauthcodegrantjwtexchange API - BUT, somewhere in the flow for this API things fail. I can see that the call to this API partially works as my Okta logs show that a token request was made using the code provided and that 3 tokens were successfully issued - id_token, access_token and refresh_token. These are returned to GC but after that is where the rest of the flow fails and the API spits out the 401 error.