Working on a email client , where I have implement auth for some email providers to access user email with net.openid:appauth android client sdk.
Following example for a outlook mail auth
clientId = BuildConfig.OAUTH_MICROSOFT_CLIENT_ID,
scopes = listOf(
"https://outlook.office.com/IMAP.AccessAsUser.All",
"https://outlook.office.com/SMTP.Send",
"offline_access",
),
authorizationEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
tokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token",
redirectUri = BuildConfig.OAUTH_MICROSOFT_REDIRECT_URI,
),
Similar way to access yahoo auth
clientId = BuildConfig.OAUTH_YAHOO_CLIENT_ID ,
scopes = listOf("mail-w"),
authorizationEndpoint = "https://api.login.yahoo.com/oauth2/request_auth",
tokenEndpoint = "https://api.login.yahoo.com/oauth2/get_token",
redirectUri = redirectUriDoubleSlash,
But the problem with Yahoo mail is , above code only works with the Public Client - Choose for mobile apps, native apps, or single-page apps for yahoo.
My app is registered as Confidential Client for yahoo hence, I have received client id as well as the secret. while using the client id with existing code, I am getting client secret cannot be empty error.
Yahoo developer portal not allowing me to change the client type to Public Client, also I can not create a new application to access mail scope .
I have a existing application created on yahoo developer in 2015 when yahoo was allowing apps to access yahoo mail scope, tried requesting for yahoo mail scope but Yahoo rejected my request with following message.
Yahoo determined that we will not officially support your app by providing Oauth2 access at this time.