Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Directus
  3. OIDC login broken with 8.1.0 update

OIDC login broken with 8.1.0 update

Scheduled Pinned Locked Moved Solved Directus
directusoidcloginclient
9 Posts 4 Posters 411 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    msbt
    App Dev
    wrote on last edited by msbt
    #1

    Hi there! I already sent an email to support, but since it's quite urgent, trying here as well, maybe someone has a solution for this. After updating to 8.1.0, OIDC authentication doesn't work anymore. It's easily reproducable, fresh install on 8.0.6 works, 8.1.0 doesn't.

    It says Service Unavailable and refuses to login and logs show this:

    WARN: [OpenID] Unknown OP error
    err: {
    "type": "OPError",
    "message": "unauthorized_client (requested grant type is not allowed for this client)",
    "stack":
    OPError: unauthorized_client (requested grant type is not allowed for this client)
    

    Any ideas/workarounds @nebulon @girish @joseph?

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #7

      So after some debugging, the actual fix is to enable the refresh_token grant type also: https://git.cloudron.io/platform/box/-/commit/16fa3390252e29f1803a18990c7b104817fa4d9f

      Basically if you add this (also put back the previously suggested code bit) and sytemctl restart box then this should work also for existing directus instances I think.

      1 Reply Last reply
      1
      • girishG Do not disturb
        girishG Do not disturb
        girish
        Staff
        wrote on last edited by
        #2

        @msbt I could reprodue this. As a quick fix, you have to revert https://git.cloudron.io/platform/box/-/commit/8621fbda7963b048aa49741c34ff283840f24c90 .

        • Edit /home/yellowtent/box/src/oidc.js
        • Delete that function issueRefreshToken entirely
        • systemctl restart box

        Unfortunately, removing above has the sideeffect of showing warnings in dokuwiki alone. But for other apps this is not a problem.

        M 1 Reply Last reply
        0
        • girishG girish

          @msbt I could reprodue this. As a quick fix, you have to revert https://git.cloudron.io/platform/box/-/commit/8621fbda7963b048aa49741c34ff283840f24c90 .

          • Edit /home/yellowtent/box/src/oidc.js
          • Delete that function issueRefreshToken entirely
          • systemctl restart box

          Unfortunately, removing above has the sideeffect of showing warnings in dokuwiki alone. But for other apps this is not a problem.

          M Offline
          M Offline
          msbt
          App Dev
          wrote on last edited by msbt
          #3

          @girish thanks for the reply, but still getting the same error even after restarting box and Directus. Any other ideas? Some cache that I might need to empty?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            msbt
            App Dev
            wrote on last edited by
            #4

            Quick update: apparently removing that snippet and fresh install is working, but for various reasons, reinstalling all my Directus instances is not a great option. Thing I've tried and didn't work: restarting app/box/server, changing location, permissions, cloning, using a fresh browser.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              c0decafe
              wrote on last edited by
              #5

              got bitten by this too, commenting out issueRefreshToken + restarting box didn't help:

              {
                "name": "DirectusError",
                "extensions": {
                  "service": "openid",
                  "reason": "Service returned unexpected response: requested grant type is not allowed for this client"
                },
                "code": "SERVICE_UNAVAILABLE",
                "status": 503
              }
              
              1 Reply Last reply
              0
              • C Offline
                C Offline
                c0decafe
                wrote on last edited by
                #6

                I confirm that commenting out issueRefreshToken() works only with a fresh install of directus.

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #7

                  So after some debugging, the actual fix is to enable the refresh_token grant type also: https://git.cloudron.io/platform/box/-/commit/16fa3390252e29f1803a18990c7b104817fa4d9f

                  Basically if you add this (also put back the previously suggested code bit) and sytemctl restart box then this should work also for existing directus instances I think.

                  1 Reply Last reply
                  1
                  • C Offline
                    C Offline
                    c0decafe
                    wrote on last edited by
                    #8

                    @nebulon thanks!
                    I confirm the below fixes it:

                    curl https://git.cloudron.io/platform/box/-/commit/16fa3390252e29f1803a18990c7b104817fa4d9f.diff | patch -d /home/yellowtent/box -p1
                    systemctl restart box
                    
                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      msbt
                      App Dev
                      wrote on last edited by
                      #9

                      thanks @nebulon & @girish, this does indeed fix everything, appreciate it 🙏

                      1 Reply Last reply
                      0
                      • M msbt marked this topic as a question on
                      • M msbt has marked this topic as solved on
                      • M msbt referenced this topic on
                      • J joseph referenced this topic on
                      • J joseph referenced this topic on
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search