Skip to content

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

@bomb-kst

Description

@bomb-kst

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions