OIDC login (provided by Authelia) not working in the iOS app #797

Closed
opened 2026-04-24 23:38:44 +02:00 by adam · 3 comments
Owner

Originally created by @rabidpug on GitHub (Dec 20, 2023).

OIDC login is working as expected via browser, but when trying to login on the iOS app I receive the error "SSO error: Token data is missing in the response".
in Authelia and Audiobookshelf's logs, I see the error "Access Request failed with error: The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. The 'redirect_uri' from this request does not match the one from the authorize request."

Authelia configuration:

- id: audiobookshelf
        description: audiobookshelf
        secret: '[SECRET]'
        sector_identifier: ''
        public: false
        authorization_policy: two_factor
        pre_configured_consent_duration: '30d'
        audience: []
        scopes:
          - openid
          - email
          - profile
        redirect_uris:
          - https://[DOMAIN]/auth/openid/callback
          - audiobookshelf://oauth
        grant_types:
          - refresh_token
          - authorization_code
        response_types:
          - code
        response_modes:
          - query
          - form_post
        userinfo_signed_response_alg: none

Steps to reproduce

  1. Try to log in with OpenID on the mobile app

Expected behaviour

  • Login should be successful

Actual behaviour

  • Login is not successful

Environment data

Audiobookshelf Version: 2.6.0

  • [Y ] iOS App?

iOS Issue

iOS Version: iOS 17.3

iPhone model: iphone 12

Originally created by @rabidpug on GitHub (Dec 20, 2023). OIDC login is working as expected via browser, but when trying to login on the iOS app I receive the error "SSO error: Token data is missing in the response". in Authelia and Audiobookshelf's logs, I see the error "Access Request failed with error: The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. The 'redirect_uri' from this request does not match the one from the authorize request." Authelia configuration: ```yaml - id: audiobookshelf description: audiobookshelf secret: '[SECRET]' sector_identifier: '' public: false authorization_policy: two_factor pre_configured_consent_duration: '30d' audience: [] scopes: - openid - email - profile redirect_uris: - https://[DOMAIN]/auth/openid/callback - audiobookshelf://oauth grant_types: - refresh_token - authorization_code response_types: - code response_modes: - query - form_post userinfo_signed_response_alg: none ``` ### Steps to reproduce 1. Try to log in with OpenID on the mobile app ### Expected behaviour - Login should be successful ### Actual behaviour - Login is not successful ### Environment data Audiobookshelf Version: 2.6.0 - [Y ] iOS App? #### iOS Issue iOS Version: iOS 17.3 iPhone model: iphone 12
adam added the bug label 2026-04-24 23:38:44 +02:00
adam closed this issue 2026-04-24 23:38:45 +02:00
Author
Owner

@rabidpug commented on GitHub (Dec 25, 2023):

Not sure if there was a change in the updates since I raised the issue, but setting a callback url of https://[DOMAIN]/auth/openid/mobile-redirect in Authelia now lets me log in.

Thanks!

@rabidpug commented on GitHub (Dec 25, 2023): Not sure if there was a change in the updates since I raised the issue, but setting a callback url of https://[DOMAIN]/auth/openid/mobile-redirect in Authelia now lets me log in. Thanks!
Author
Owner

@metril commented on GitHub (Dec 30, 2023):

The documentation needs to be updated. I ran into this same issue. The audiobookshelf://oauth mentioned in the OIDC setup is not correct. It needs to be https://yourdomain.com/auth/openid/mobile-redirect.

@metril commented on GitHub (Dec 30, 2023): The documentation needs to be updated. I ran into this same issue. The `audiobookshelf://oauth` mentioned in the OIDC setup is not correct. It needs to be `https://yourdomain.com/auth/openid/mobile-redirect`.
Author
Owner

@nichwall commented on GitHub (Dec 30, 2023):

The documentation needs to be updated.

You can open a pull request at https://github.com/advplyr/audiobookshelf-web to help update the documentation.

@nichwall commented on GitHub (Dec 30, 2023): > The documentation needs to be updated. You can open a pull request at https://github.com/advplyr/audiobookshelf-web to help update the documentation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#797