Skip to content

Adding support for prompt=create #1611

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

Merged
merged 8 commits into from
Apr 6, 2022
Merged

Adding support for prompt=create #1611

merged 8 commits into from
Apr 6, 2022

Conversation

fadidurah
Copy link
Contributor

@fadidurah fadidurah commented Mar 30, 2022

What
Adding support for prompt=create in MSAL, where user is prompted to create a new account. Requires AzureAD/microsoft-authentication-library-common-for-android#1707.

Example URL:
https://login.microsoftonline.com/d014fd44-d398-4813-a3a9-8cd725f7f356/oauth2/authorize?
client_id=da53de5a-636b-425f-ad57-0f62d6f974c7
&response_type=id_token
&resource=da53de5a-636b-425f-ad57-0f62d6f974c7
&scope=openid
&nonce=default_nonce
&redirect_uri=https://jwt.ms/
&prompt=create

image

The draft OIDC spec for this is here: https://openid.net/specs/openid-connect-prompt-create-1_0.html

Why
Other MSAL Libraries also adding support: https://identitydivision.visualstudio.com/Engineering/_boards/board/t/Auth%20Client%20-%20Android/Backlog%20items/?workitem=1233365

How
Adding CREATE field to Prompt.java and support for that field.

https://docs.microsoft.com/en-us/azure/active-directory/external-identities/self-service-sign-up-user-flow#:~:text=Enable%20self-service%20sign-up%20for%20your%20tenant,-Before%20you%20can&text=Under%20Azure%20services%2C%20select%20Azure,Select%20Save.

Finish this checklist from MSAL.NET page: AzureAD/microsoft-authentication-library-for-python#356.

Test
Tested this end-to-end on local device in a tenant with a specified sign-up user flow. Added some unit tests.

@codecov-commenter
Copy link

codecov-commenter commented Mar 30, 2022

Codecov Report

Merging #1611 (7efa321) into dev (8c46290) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                dev    #1611      +/-   ##
============================================
+ Coverage     49.31%   49.37%   +0.05%     
- Complexity      370      372       +2     
============================================
  Files            59       59              
  Lines          2705     2708       +3     
  Branches        333      333              
============================================
+ Hits           1334     1337       +3     
  Misses         1227     1227              
  Partials        144      144              
Impacted Files Coverage Δ
...ain/java/com/microsoft/identity/client/Prompt.java 84.21% <100.00%> (+2.96%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9bc81d...7efa321. Read the comment docs.

@shahzaibj
Copy link
Contributor

Do we have support in Lab Api to test this?

@fadidurah
Copy link
Contributor Author

Do we have support in Lab Api to test this?

We do not have lab support for this yet. I used a tenantMonkey instance I had made previously to set up sign-up flow and get it working end-to-end.

@shahzaibj
Copy link
Contributor

Do we have support in Lab Api to test this?

We do not have lab support for this yet. I used a tenantMonkey instance I had made previously to set up sign-up flow and get it working end-to-end.

Can you work with the lab team to add test accounts for this in the LAB API?

@fadidurah
Copy link
Contributor Author

Do we have support in Lab Api to test this?

We do not have lab support for this yet. I used a tenantMonkey instance I had made previously to set up sign-up flow and get it working end-to-end.

Can you work with the lab team to add test accounts for this in the LAB API?

Yes, im reaching out to Ryan on Monday.

@fadidurah
Copy link
Contributor Author

I reached out to Ryan and they are committing to supporting this in LAB either this quarter or next.

@fadidurah fadidurah merged commit 5c91d28 into dev Apr 6, 2022
@fadidurah fadidurah deleted the fadi/prompt-create branch April 6, 2022 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants