Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I customize hellojs to use with other oidc sources (eg. authentik)? #668

Open
bomb-kst opened this issue Aug 24, 2023 · 0 comments

Comments

@bomb-kst
Copy link

bomb-kst commented Aug 24, 2023

I tried to apply hellojs to use with my authentik server (https://goauthentik.io/docs/providers/oauth2/)

But when I tried to init and get authResponse. It seems something is not correct.

hello.init({
        myoauth: {
          name: 'myoauth',
          id: 'XTK0Rh21JO7UTpKhF9bivvzeY2l4JWV7JzantO16',
          oauth: {
            version: 2,
            auth: 'http://192.168.xxx.xx/application/o/authorize/',
            grant: 'http://192.168.xxx.xx/application/o/token/'
          },
          base: 'http://192.168.xxx.xx/application/o/'
        }
      }, {
        redirect_uri: 'http://localhost:9000/customer',
        scope: 'profile, openid, email',
        response_type: 'code',
        display: 'page'
      });

I got an error from hello.getAuthResponse('myoauth')

{
    "error": {
        "code": "invalid_credentials",
        "message": "The client_id \"XTK0Rh21JO7UTpKhF9bivvzeY2l4JWV7JzantO16\" is unknown. Register your app credentials by visiting https//auth-server.herokuapp.com"
    },
    "error_message": "The client_id \"XTK0Rh21JO7UTpKhF9bivvzeY2l4JWV7JzantO16\" is unknown. Register your app credentials by visiting https//auth-server.herokuapp.com",
    "state": "",
    "client_id": "XTK0Rh21JO7UTpKhF9bivvzeY2l4JWV7JzantO16",
    "network": "myoauth",
    "display": "page",
    "redirect_uri": "http://localhost:9000/customer",
    "scope": "profile,openid,email",
    "page_uri": "http://localhost:9000/",
    "oauth": {
        "version": 2,
        "auth": "http://192.168.xxx.xx/application/o/authorize/",
        "grant": "http://192.168.xxx.xx/application/o/token/"
    },
    "oauth_proxy": "https://auth-server.herokuapp.com/proxy"
}

the clientId XTK0Rh21JO7UTpKhF9bivvzeY2l4JWV7JzantO16, I get it from my authentik server not from https//auth-server.herokuapp.com. Is that the cause of my problem?

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

No branches or pull requests

1 participant