okta / samples-nodejs-express-4

Express 4 samples. Will publish an artifact that can be consumed by end-to-end sample repos
Other
119 stars 119 forks source link

unauthorized #51

Closed hampsterx closed 4 years ago

hampsterx commented 6 years ago
 hostname: 'myorg.okta.com',
  method: 'GET',
  path: '/oauth2/default/.well-known/openid-configuration',
  protocol: 'https:',
  url: 'https://myorg.okta.com/oauth2/default/.well-known/openid-configuration',
  statusCode: 401,
  statusMessage: 'Unauthorized',

Simply cannot get it to start correctly.

pretty sure settings are correct..

{
  "webServer": {
    "port": 8080,
    "oidc": {
      "clientId": "xx",
      "clientSecret": "yy",
      "issuer": "https://myorg.okta.com/oauth2/default",
      "redirectUri": "http://localhost:8080/authorization-code/callback",
      "scope": "openid profile email"
    }
  },
  "resourceServer": {
    "port": 8000,
    "oidc": {
      "issuer": "https://myorg.okta.com/oauth2/default"
    },
    "assertClaims": {
      "aud": "api://default",
      "cid": "xx"
    }
  }
}

any ideas?

Also, your recent changes to the admin UI the url for org is no longer shown in dashboard, I presume its https://xxx.okta.com as noted in docs that it's same as dashboard minus the "-admin".

There is additional documentation on your site that needs to be updated as well, I am thoroughly NOT enjoying the experience right now after trying this sample, my own custom one, seeing the high no of open issues on "okta-oidc-js" and reading your forums. GRR

manueltanzi-okta commented 6 years ago

Hi @hampsterx , thank you for your question!

Just to clarify, which one of the three samples are you trying to run? Okta-Hosted Login , Custom Login Page or Resource Server?

I am sorry you feel like that, we are working on improving our developer experience, hopefully you will enjoy it better in the future!

trujamal commented 4 years ago

Has this issue been resolved already, in regards to the Unauthorized message from the server? Following the latest docs on the Custom Login Page example.

Edit - It appears that if you only use the Okta domain and not with the oauth provider the application will not work as intended.

swiftone commented 4 years ago

Hi @trujamal -

We're not aware of any problem (this issue was never clarified from the reporting dev).

From your edit it sounds like you've figured out the issue. If you have any further issues please open a new issue with the details.