Impossible to login with microsoft business account
Describe the bug Impossible to login with microsoft business account
To Reproduce When we use the following function OIDAuthorizationService.discoverConfiguration(forIssuer: url) using as url "https://login.live.com", everything goes right. Since the url "https://login.live.com" is not working with business account, we wish to use the following url "https://login.microsoftonline.com" or "https://login.microsoftonline.com/common/v2.0/", but the function OIDAuthorizationService.discoverConfiguration reply with the following error
Error Domain=org.openid.appauth.general Code=-5 "JSON error parsing document at 'https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration': Invalid URL: issuer" UserInfo={NSLocalizedDescription=JSON error parsing document at 'https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration': Invalid URL: issuer, NSUnderlyingError=0x600000a0f360 {Error Domain=org.openid.appauth.general Code=-2 "Invalid URL: issuer" UserInfo={NSLocalizedDescription=Invalid URL: issuer}}}
so for us it's impossible to login with microsoft business account. The url provided is correct, since the same url works well on android.
Expected behavior The function OIDAuthorizationService.discoverConfiguration should complete without error.
Environment
- Device: All iOS devices
- OS: All iOS version, starting from iOS 10.
I've also run into the issue, I suspect it's because for some reason microsoft has chosen to put a curly brace in the issuer url here: https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
https://github.com/openid/AppAuth-iOS/pull/714