Coder Social home page Coder Social logo

Comments (6)

vromero avatar vromero commented on September 15, 2024 1

Hey @bonddim,

After you found those two sloppy errors I went' back and checked the fundamentals. Turner our I wasn't requesting the right scopes:

      extra_scopes:
        - email, openid, profile

With this everything started to work.

Thanks

from wg-portal.

bonddim avatar bonddim commented on September 15, 2024

@vromero did you tried with other username?
I think, that there is conflict with default admin user and your admin user from OIDC

from wg-portal.

vromero avatar vromero commented on September 15, 2024

Thanks @bonddim, that is a great catch.

I tried, however, with some other user and had no luck. Got the exact same result.

from wg-portal.

vromero avatar vromero commented on September 15, 2024

Some additional information that I failed to mention. OIDC works just fine if I don't provide a field_map. I just need to do it to assign admin privileges to some users.

from wg-portal.

bonddim avatar bonddim commented on September 15, 2024

one more...
Try to use is_admin instead of isAdmin property in your field_map:

...
field_map:
  is_admin: isAdmin

from wg-portal.

vromero avatar vromero commented on September 15, 2024

Wow that's another excellent catch!

Unfortunately, it didn't help.

Something that I notice is that the user_identifier: preferred_username seems to be some kind of inhibitor. If I leave it uncommented nothing works, if I comment it seems to work (but anything else in the section doesn't seem to have effect).

For instance the following does not work:

      field_map:
        user_identifier: preferred_username
        #email: email
        #firstname: given_name
        #lastname: given_name
        #phone:
        #department: given_name
        #is_admin: isAdmin

And as you can see, the non-admin user I'm testing with now has preferred_username perfectly well defined:

{
    "iss": "https://xxx/application/o/wgportal/",
    "sub": "56e5aa07a336ab4589d8faa96a0662a2be9261142d42ac2fcfa758e5c809242b",
    "aud": "acvgD9pRIlSmfCCFMH56iOw9NQqwg867hRzTePh6",
    "exp": 1720906073,
    "iat": 1720904273,
    "auth_time": 1720904273,
    "acr": "goauthentik.io/providers/oauth2/default",
    "amr": [
        "pwd"
    ],
    "email": "",
    "email_verified": true,
    "isAdmin": false,
    "name": "Perry",
    "given_name": "Perry",
    "preferred_username": "perry",
    "nickname": "perry",
    "groups": [
        "Users"
    ]
}

from wg-portal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.