swelham / ueberauth_microsoft

Microsoft Strategy for Überauth
MIT License
37 stars 35 forks source link

Add support for lc (locale) param in authorization URL #80

Closed alejandrodevs closed 11 months ago

alejandrodevs commented 12 months ago

In order to change the locale in the Microsoft IDP interface, the param lc has to be added in the authorization url. List of supported locales: https://ss64.com/locale.html

Example URL:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=client_id&lc=10&prompt=&redirect_uri=http%3A%2F%2Fwww.example.com%2Fauth%2Fmicrosoft%2Fcallback&response_type=code&scope=https%3A%2F%2Fgraph.microsoft.com%2Fuser.read+openid+email+offline_access&state=4aLMsU9-69Hafb0QJ0AMCSQM

What do you think? @swelham

alejandrodevs commented 12 months ago

This is similar to what has been done in this PR: https://github.com/ueberauth/ueberauth_google/pull/102.

alejandrodevs commented 11 months ago

@swelham Did you have the opportunity to take a look at this?

swelham commented 11 months ago

Hey @alejandrodevs. Sorry, I haven't had chance to look at this yet. I will aim to take a look either today or tomorrow if that works?

alejandrodevs commented 11 months ago

@swelham Sure, that works. My apologies if I sounded too insistent, it wasn't my intention. I just wanted to make sure this PR didn't go unnoticed.

swelham commented 11 months ago

No worries, this looks good to me.

I will get it shipped.