-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Azure SSO with Amplify without hosted UI #13119
Comments
hello @sumitsahoo . Currently OAuth flows are supported via Hosted UI only. If you call |
@israx Okay but any way we can autoredirect? Because from console if I click on hosted UI it directly takes me to Microsoft login but when done from app with Also since the auth details are added in |
Yes you can by pass the Hosted UI view if you call |
@sumitsahoo I see, Got it now. So if I give idp name inside parameter, it is taking directly to Microsoft. Many thanks.
|
@israx I think this missing piece of information deserves to be in the documentation :) I can gladly help if there's any way I can update the docs with info on how to achieve SSO using Azure AD. I am sure many people are searching for the same :) |
@sumitsahoo, glad you were able to unblock yourself after @israx's comment above. Did you see the Custom Providers section within our docs before running into this issue? If there's more clarity that can be added to the documentation, would like to know. Thanks! |
@cwomack Yes have seen almost all the documentation including v5 and v6 migration guide. I feel the missing piece is having information about Azure AD SSO integration in one place. Like in the above example suggested by @israx, I did not know the Also a bit of of topic, any documentation on how to fetch user attributes in v6 with SAML? We seems to be getting error. Code: |
@israx Any help on the |
hello @sumitsahoo . Scopes limit the level of access that an app has over a resource server or the server where the data is located at. In your case you are not able to access the data from Cognito, in order to do that your access token need to contain the Thus you need to add that scope into your Amplify |
@israx I do have the scope Apart from
This results in the below error message
|
you need to add the scope into your Amplify configuration. Take in mind that you need to re-authenticate in order to update your access token.
|
@israx You were right, I missed it in configure. Thanks a ton 🙏🏻 |
@israx Sorry we hit another roadblock. We can not add storage with this imported Cognito user pool. I tried to create an identity pool and link with the user pool but no luck. |
hello @sumitsahoo . Could you please open a dedicated issue detailing reproduction steps ? |
@israx Sure, Let me close this one. |
Is this related to a new or existing framework?
React
Is this related to a new or existing API?
Authentication
Is this related to another service?
No response
Describe the feature you'd like to request
We need to integrate our Org's SSO and it is Azure AD based. So I have configured the Cognito and added SAML user pool with Azure IDP. Now we can do SSO using the below code:
Note: Removed actual client ids.
Now the issue is, we do not want to redirect to hosted UI rather want to invoke SSO directly.
Describe the solution you'd like
My proposal would be, if Cognito is configured to use only one login source then we don't have to show the UI at all and redirect directly. Maybe we can add a key and make it configurable like below:
Describe alternatives you've considered
Another way would be to totally avoid hosted UI and do it via code directly but so far I have not seen any examples yet. The documentation is a bit lacking in Amplify.
Additional context
I hope in the future Amplify team adds Microsoft login by default as social provider since most of the organizations use Azure AD.
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: