Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

"The code was not returned or is not accessible" #43

Open
whod81 opened this issue Apr 21, 2021 · 6 comments
Open

"The code was not returned or is not accessible" #43

whod81 opened this issue Apr 21, 2021 · 6 comments

Comments

@whod81
Copy link

whod81 commented Apr 21, 2021

I've tried running this on a couple different platforms and I have gotten the same error message, "The code was not returned or is not accessible"

It looks like there should be a get query on the callback and I'm not getting one? I am not sure.

The URL at the end:
http://localhost:8080/authorization-code/callback?state=ApplicationState&error=invalid_request&error_description=The+authorization+server+id+is+invalid.

@bretterer
Copy link
Collaborator

Hello @whod81. Can you tell me which one of the samples you are using. It appears you may be using the custom-login?

If this is the case, please share your config (minus any keys) that you are using for the sign in widget initialization. Could you also please provide some reproduction steps that you are using to help us debug.

@whod81
Copy link
Author

whod81 commented Apr 21, 2021

i am using the golang okta-hosted-login

Login redirect URI is configured in Okta like this:

http://localhost:8080/authorization-code/callback

.env file is this:

CLIENT_ID=xXXXXXXXXXXXx
CLIENT_SECRET=xxXXXXXXXXXXXXXXXX
ISSUER=https://mycompanynametest.okta.com/oauth2/default

To reproduce I simply "go run main.go"
go to localhost:8080 in browser
and click Login button

@mraible
Copy link

mraible commented Apr 22, 2021

If you log in to your Okta org and go to Security > API, do you see a "default" server listed there? If not, you probably don't have API access management as a feature. If you create a new developer account at developer.okta.com/signup, you can get it for free.

@whod81
Copy link
Author

whod81 commented Apr 22, 2021

@mraible that is indeed the case. I was unaware I needed that to authenticate with OIDC.

Is this specific to the GoLang implementation? My OIDC authentication is working okay with other tools in this environment. (For instance I put this same application configuration on an AWS Load Balancer and it worked properly).

@ghost
Copy link

ghost commented May 8, 2023

Running into the same issue here despite having a default server listed under API. Also using the golang sample.

The error description is User is not assigned to the client application. however the docs state that If you are currently using your Developer Console, you already have a Single Sign-On (SSO) session for your Org. You will be automatically logged into your application as the same user that is using the Developer Console here

What does it mean to assign a user to the client application? Is that something I can do in the dev console?

@ghost
Copy link

ghost commented May 8, 2023

Running into the same issue here despite having a default server listed under API. Also using the golang sample.

The error description is User is not assigned to the client application. however the docs state that If you are currently using your Developer Console, you already have a Single Sign-On (SSO) session for your Org. You will be automatically logged into your application as the same user that is using the Developer Console here

What does it mean to assign a user to the client application? Is that something I can do in the dev console?

Got the solution from this issue. Under applications, you can click the gear icon for your app of choice and then assign to users or groups. I assigned to everyone for my use case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants