Reputation: 79
I have a single web application that is using different locales (around 35) to render localized content. I am using token flow authentication (more details https://dev.onedrive.com/auth/graph_oauth.htm) to generate a new access token.
This is implemented through a new window that is doing a GET request to login.live.com/oauth20_authorize.srf?client_id=....&scope=scope=onedrive.readwrite&response_type=token&redirect_uri=REDIRECT_URI (when there is an access_token expiration I am using a silent way via iframes to get a new access_token the same way as with window). Similar way of authentication was done on OneDrive Explorer sample web app (https://github.com/OneDrive/onedrive-explorer-js)
After successful authentication, there is a redirect to the REDIRECT_URI (this is built dynamically on my app based on the locale.
The problem I have is that I cannot manually add all the possible redirect uris on the Microsoft registration portal (there is a limit of 21).
Do you know if there is any way to do that by using wildcards on the setup of redirect_uris in the portal? Or maybe another way to implement that logic? I did some investigation online and found many developers having the same problem. Is there any recent patch/update available regarding that?
Thanks.
Upvotes: 1
Views: 1104
Reputation: 79
What I did as a solution was to add a new servlet / temp page that is being used as a callback page (using the redirect URI that is defined on Microsoft Application portal). The page is responsible for doing the logic and then redirect to the main application page.
Upvotes: 0
Reputation: 109
I know I should post this as a comment, sadly I don't have enough reputation to post comments..
If the user chooses his locale before authentication you could save the locale settings temporarily to Session (or wherever you want). Now you can create your own redirect page where you read the settings from the session (or wherever you saved the settings) and redirect to the right URI yourself. This way you only have to register the URI of your own redirect page on the Microsoft registration portal.
Upvotes: 1