Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom scheme for AuthorizationEndpoint #512

Open
mwilzin opened this issue Aug 2, 2024 · 2 comments
Open

Use custom scheme for AuthorizationEndpoint #512

mwilzin opened this issue Aug 2, 2024 · 2 comments

Comments

@mwilzin
Copy link

mwilzin commented Aug 2, 2024

I'm trying to implement the DATEV OAuth2.0/OpenID Connect into my application but I'm occurring some errors...
They don't use a website for mobile authentication on their side but their own app: https://apps.apple.com/app/id943870921
Its scheme to call a login session on both iOS and Android is as followed: datevsmartlogin://doLogin/
So when parsing in this URL for the authorizationEndpoint and all other required endpoint from the discoveryURL: https://login.datev.de/openid/.well-known/openid-configuration into my own configuration it looks like this

serviceConfiguration: const AuthorizationServiceConfiguration(
  authorizationEndpoint: 'datevsmartlogin://doLogin/',
  tokenEndpoint: 'https://api.datev.de/token',
  endSessionEndpoint: 'https://api.datev.de/endsession',
),

But when executing the login flow with the flutter_appauth packages there's an error on both Android and iOS denying the use of non https or http endpoints for the authorizationEndpoint.
I have to use the app to make the Authorization so am I missing something here or is this just a problem of the package?
Thanks

@hschaeufler
Copy link

authorizationEndpoint needs a Webpage which will first shown in a secure ASWebAuthenticationSession. When you look in the https://login.datev.de/openid/.well-known/openid-configuration you see https://login.datev.de/openid/authorize as authorization_endpoint. From this Page maybe Datev opens there App via Deeplink?

"authorization_endpoint": "https://login.datev.de/openid/authorize",

@mwilzin
Copy link
Author

mwilzin commented Aug 23, 2024

Hey thanks for your reply, I really appreciate it.
Yes I saw this link but DATEV also has its own package which sadly only works natively. When initiating a login session with this package it automatically opens the app via a deeplink without a web session in between.
I would like to rebuild this flow as this would ease up the use flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants