Skip to content

Is authorization_code only flow possible? (ERR_NO_AUTHORIZATION_CODE) #199

@fangornoftheforest

Description

@fangornoftheforest

Flow type: Authorization code
Platform: iOS
Provider: Azure
Error: ERR_NO_AUTHORIZATION_CODE

Code:

            const options = {
                authorizationBaseUrl: 'https://login.microsoftonline.com/tenantid/oauth2/v2.0/authorize',
                accessTokenEndpoint: null, (<- documentation leaves me unsure if I need to set this to null, blank or absent)
                resourceUrl: null,
                scope: 'api://foo/foo.Read openid offline_access email'
                logsEnabled: true,
                pkceEnabled: true,
                ios: {
                    appId: foo
                    responseType: "code",
                    redirectUrl: msauth.foo.bar://auth
                }
            }

Plugin returns ERR_NO_AUTHORIZATION_CODE even though the authorization code is present in the response parameters at OAuth2Swift:127.

The flow I am using is to fetch the authorization code and pass this to our back-end to resolve the refresh and ID token. This works without issue on Android but seems to be a huge problem on iOS. I have tried to ignore the response and parse the redirect using appUrlOpen but there seems to be no way to access the codeVerifier. Any advice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions