Skip to content

Create the msal-custom-auth package for supporting the external ID authentication (sign-in, sign-up and SSPR) #7599

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

Open
wants to merge 114 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 108 commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
eeee622
Skeleton
Nov 8, 2024
897677b
Commit
Nov 10, 2024
8972d9e
Commit
Nov 11, 2024
bedfd47
Commit
Nov 11, 2024
55de7d9
Refactor 1
shenj Nov 19, 2024
b228f19
Update for design doc
shenj Nov 21, 2024
74b4431
Commit
shenj Nov 22, 2024
6c863f5
rename design doc
shenj Nov 22, 2024
cb321c9
Design update
shenj Nov 22, 2024
fc59df0
Commit
shenj Nov 22, 2024
09e1b25
Remove the design doc
shenj Nov 22, 2024
4ba880b
ignore build output
shenj Nov 27, 2024
35b4cee
Updates for feedbacks
shenj Nov 28, 2024
c589ec1
Commit
shenj Dec 9, 2024
c78a870
Commit
shenj Dec 9, 2024
284cee0
Restructure folders
shenj Dec 13, 2024
238a289
rename package
shenj Dec 13, 2024
fd0514e
Rename
shenj Dec 13, 2024
d80be99
feedbacks
shenj Dec 23, 2024
f259b87
- Setup msal-custom-auth sample for e2e
nguyencuong2596 Dec 24, 2024
e5d113b
Merge branch 'jiashen/sketeton' of https://github.com/AzureAD/microso…
nguyencuong2596 Dec 24, 2024
8821c6b
Commit
shenj Dec 24, 2024
0d7e08e
Merge branch 'dev' into jiashen/sketeton
nguyencuong2596 Dec 24, 2024
1546766
Change build command
nguyencuong2596 Dec 24, 2024
7bef47c
Update packages
nguyencuong2596 Dec 24, 2024
360914d
Alter build:all
nguyencuong2596 Dec 24, 2024
9c63cbf
Change files
nguyencuong2596 Dec 24, 2024
0f9a609
Fix lint and alter build:all
nguyencuong2596 Dec 24, 2024
a43a3e7
Change package
nguyencuong2596 Dec 24, 2024
a4456af
Modify build:all
nguyencuong2596 Dec 27, 2024
dd900f8
Update package lock
nguyencuong2596 Dec 27, 2024
dcdd889
Update package
nguyencuong2596 Dec 27, 2024
11a1501
Update package
nguyencuong2596 Dec 27, 2024
7e2a275
Update readme
nguyencuong2596 Dec 27, 2024
ebd1f05
Update package.json
nguyencuong2596 Dec 30, 2024
502f3b7
Change files
nguyencuong2596 Dec 30, 2024
c2693d4
Update sample-sample
nguyencuong2596 Dec 30, 2024
5ab330f
Add puppeteer and e2e-test-utils
nguyencuong2596 Dec 30, 2024
cef93eb
Format code
nguyencuong2596 Dec 30, 2024
bc4ddfb
Use shx rm instead of rimraf
nguyencuong2596 Dec 30, 2024
d810d5f
Update api document
nguyencuong2596 Dec 30, 2024
b611c3f
Common changes for signin
shenj Jan 8, 2025
8e9227d
Adding Sign up Api Client and Sign Up types
axhaferllari Jan 8, 2025
e06b701
Remove unused file
axhaferllari Jan 8, 2025
2a63c7d
Sign-in completed updated
shenj Jan 15, 2025
e745bac
Fix the style error
shenj Jan 16, 2025
ea58577
Merge pull request #7508 from AzureAD/custom-auth/jiashen/signin
shenj Jan 17, 2025
a65bf17
Create the interfaces for signup in network client (#7521)
shenj Jan 20, 2025
9974ee8
Custom auth/jiashen/sign up (#7542)
shenj Jan 30, 2025
12fec86
Add unit tests for sign-up
shenj Feb 1, 2025
7dc4f57
Add Api Clients for all endpoints (#7553)
albanx Feb 8, 2025
8a79e96
Fix the network client issue.
shenj Feb 9, 2025
c5d3c95
Fix the format issue
shenj Feb 9, 2025
acd5383
Reset password feature implementation
shenj Feb 11, 2025
4ac51c8
Add unit tests for password reset
shenj Feb 12, 2025
56cd81d
Add client_info property when calling signin token endpoint
shenj Feb 13, 2025
c756465
Support cache entities generation and caching
shenj Feb 17, 2025
3c0d349
[CustomAuth] Create React JS Sample skeleton
axhaferllari Feb 20, 2025
cf6aeb3
remove nextjs images
axhaferllari Feb 20, 2025
3b1927c
add npm install
axhaferllari Feb 21, 2025
a7cbbbb
Update instructions and docs
axhaferllari Feb 21, 2025
656223c
Fix override interfeer
axhaferllari Feb 21, 2025
8305029
GetCurrentAccount/SignOut implementation and a few improvements (#7586)
shenj Feb 25, 2025
aeeda3b
Support get access token
yongdiw Feb 25, 2025
81f2373
Remove msal-common references and create same function for generating…
yongdiw Feb 26, 2025
77c4209
Remove package.json changes
yongdiw Feb 26, 2025
79f4794
Fix comments
yongdiw Feb 26, 2025
f6bbdaa
Fix comments - moving functions, add default scopes, logs
yongdiw Feb 26, 2025
f564700
Fix comments - remove isRefreshTokenValid, remove un-needed error han…
yongdiw Feb 26, 2025
f18d393
Fix comments - move createCommonSilentFlowRequest, fix its unit tests
yongdiw Feb 26, 2025
06cec30
Merge branch 'dev' into custom-auth/main
shenj Feb 26, 2025
3a941b0
Fix the merge issue
shenj Feb 26, 2025
b74553b
Fix comments - remove unused idTokenHints constants and invalidScopes…
yongdiw Feb 27, 2025
104de21
Fix comments - update AuthorityMetadataEntity expireAt, update for ge…
yongdiw Feb 27, 2025
d0c60b9
Fix comments - give max safe integer
yongdiw Feb 27, 2025
1851cb1
Remove unused constants and references
yongdiw Feb 27, 2025
74f845f
Merge pull request #7595 from AzureAD/custom-auth/get-token
yongdiw Feb 27, 2025
e09aefb
Changing to yarn to avoid conflicts
axhaferllari Feb 28, 2025
da738a1
update readme
axhaferllari Feb 28, 2025
7c705fb
Merge branch 'custom-auth/main' into custom-auth/alban/react-nextjs-s…
axhaferllari Mar 2, 2025
ac6be7a
Fix: import Constant from msal-common and update version of msal-brow…
axhaferllari Mar 2, 2025
375b50a
Fix the errors introduced by msal-browser breaking changes (#7605)
shenj Mar 3, 2025
e63ae33
Update Error handling and log pii info
yongdiw Mar 3, 2025
53fa87a
comments - remove public key word
yongdiw Mar 4, 2025
3a3c4ad
Comments - add correlation id for all logs
yongdiw Mar 4, 2025
57bb20c
Comments - add subError property
yongdiw Mar 4, 2025
f140cec
Merge pull request #7608 from AzureAD/yongdi/error-handling-pii
yongdiw Mar 4, 2025
ab4ca74
Some improvements (#7607)
shenj Mar 5, 2025
e25a505
update pipeline config
axhaferllari Mar 5, 2025
5d0fb2c
add a sample test
axhaferllari Mar 5, 2025
f140870
Merge pull request #7583 from AzureAD/custom-auth/alban/react-nextjs-…
albanx Mar 5, 2025
69ae88b
Update logging level to use verbose and update index.ts (#7617)
yongdiw Mar 6, 2025
adbfc3c
Add Angular sample
axhaferllari Mar 8, 2025
159144b
Merge pull request #7625 from AzureAD/custom-auth/alban/angular-sample
albanx Mar 11, 2025
5a55c20
Merge remote-tracking branch 'origin/dev' into custom-auth/main
shenj Mar 12, 2025
d623c23
Rebuild
shenj Mar 12, 2025
cd2d065
Add doc for all public components and update index.ts (#7634)
yongdiw Mar 13, 2025
890f9e1
Fix the some unit tests which caused the open handles issue (#7619)
shenj Mar 13, 2025
7d7eba3
[Fix] Fix development on local and remove not needed checks, improved…
axhaferllari Mar 14, 2025
ca3df62
Fix extension module for discovery
axhaferllari Mar 14, 2025
4a63f57
fix linting issue
axhaferllari Mar 14, 2025
7d2a4e7
Merge pull request #7639 from AzureAD/custom-auth/alban/fix-for-dev
albanx Mar 14, 2025
398c424
Refactor the codes to remove the handler factory (#7665)
shenj Mar 31, 2025
7c49060
Merge dev branch changes and remove unused sample app (#7678)
shenj Apr 2, 2025
37b3172
package lock fix
shenj Apr 2, 2025
4f38594
Merge remote-tracking branch 'origin/dev' into custom-auth/main
shenj Apr 2, 2025
2314a2c
Change files
shenj Apr 7, 2025
72555ba
Support web fallback (#7698)
yongdiw Apr 17, 2025
5a47e18
Merge remote-tracking branch 'origin/dev' into custom-auth/main
shenj May 16, 2025
01c1e30
Move the custom auth features into msal-browser
shenj May 21, 2025
c0afd9d
Remove the unnecessary changes
shenj May 21, 2025
2f31b01
Change files
shenj May 21, 2025
5fccb10
Fix the format error
shenj May 21, 2025
88deba4
Refactor the index for custom-auth
shenj May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/issue_template_bot.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"@azure/msal-node"
]
},
"msal-custom-auth": {
"searchStrings": [
"@azure/msal-custom-auth"
]
},
"adal-node": {
"searchStrings": [
"adal-node"
Expand Down Expand Up @@ -93,4 +98,4 @@
"incompleteTemplateMessage": "Please update the original issue and make sure to fill out the entire issue template so we can better assist you.",
"noTemplateMessage": "Please open a new issue and use one of the provided issue templates. Thanks!",
"noTemplateClose": true
}
}
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ msal-browser:
- lib/msal-browser/**/*
msal-react:
- lib/msal-react/**/*
msal-custom-auth:
- lib/msal-custom-auth/**/*
samples:
- samples/**/*
documentation:
Expand Down
7 changes: 6 additions & 1 deletion .pipelines/1p-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resources:
- repository: 1P
type: git
name: IDDP/msal-javascript-1p
ref: master
ref: custom-auth/pipeline # TODO: change back to master after pipeline is working

extends:
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
Expand Down Expand Up @@ -60,6 +60,11 @@ extends:
libName: msal-react
path: "lib/"
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- template: .pipelines/templates/ci-template.yml@1P
parameters:
libName: msal-custom-auth
path: "lib/"
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- template: .pipelines/templates/ci-template.yml@1P
parameters:
libName: msal-angular
Expand Down
168 changes: 93 additions & 75 deletions .pipelines/3p-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ parameters:
type: string
default: "windows"
values:
- "windows"
- "linux"
- "windows"
- "linux"
- name: "runBrowserTests"
displayName: "Run Browser Tests"
type: boolean
Expand All @@ -26,6 +26,10 @@ parameters:
displayName: "Run Angular Tests"
type: boolean
default: true
- name: "runCustomAuthTests"
displayName: "Run Custom Auth Tests"
type: boolean
default: true
- name: "npmInstallTimeout"
displayName: "NPM Install Timeout (Tests)"
type: number
Expand All @@ -50,7 +54,7 @@ resources:
- repository: 1P
type: git
name: IDDP/msal-javascript-1p
ref: master
ref: custom-auth/pipeline # TODO: change back to master after pipeline is working
extends:
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
parameters:
Expand All @@ -62,75 +66,89 @@ extends:
- stage: e2e_test
displayName: "3P E2E Tests"
jobs:
- ${{ if eq(parameters.runBrowserTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_browser"
targetLib: "msal-browser"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-browser-samples"
samples:
- "client-capabilities"
- "onPageLoad"
- "pop"
- "customizable-e2e-test"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runNodeTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_node"
targetLib: "msal-node"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-node-samples"
nodeVersions: [16, 18, 20, 22]
samples:
- "auth-code"
- "auth-code-cli-app"
- "client-credentials"
- "client-credentials-with-cert-from-key-vault"
- "device-code"
- "silent-flow"
- "b2c-user-flows"
# - "on-behalf-of"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runReactTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_react"
targetLib: "msal-react"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-react-samples"
samples:
- "nextjs-sample"
- "react-router-sample"
- "typescript-sample"
- "b2c-sample"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runAngularTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_angular"
targetLib: "msal-angular"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-angular-samples"
samples:
- "angular-b2c-sample"
- "angular-modules-sample"
- "angular-standalone-sample"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runBrowserTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_browser"
targetLib: "msal-browser"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-browser-samples"
samples:
- "client-capabilities"
- "onPageLoad"
- "pop"
- "customizable-e2e-test"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runNodeTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_node"
targetLib: "msal-node"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-node-samples"
nodeVersions: [16, 18, 20, 22]
samples:
- "auth-code"
- "auth-code-cli-app"
- "client-credentials"
- "client-credentials-with-cert-from-key-vault"
- "device-code"
- "silent-flow"
- "b2c-user-flows"
# - "on-behalf-of"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runReactTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_react"
targetLib: "msal-react"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-react-samples"
samples:
- "nextjs-sample"
- "react-router-sample"
- "typescript-sample"
- "b2c-sample"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runAngularTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_angular"
targetLib: "msal-angular"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-angular-samples"
samples:
- "angular-b2c-sample"
- "angular-modules-sample"
- "angular-standalone-sample"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
- ${{ if eq(parameters.runCustomAuthTests, true) }}:
- template: .pipelines/templates/e2e-tests.yml@1P
parameters:
jobName: "validate_msal_custom_auth"
targetLib: "msal-custom-auth"
poolType: ${{ parameters.poolType }}
stage: "CI"
sourceRepo: ${{ variables.sourceRepo }}
sourceBranch: ${{ variables.sourceBranch }}
workspace: "samples/msal-custom-auth-samples"
samples:
- "sample-sample"
debug: ${{ parameters.debug }}
npmInstallTimeout: ${{ parameters.npmInstallTimeout }}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
{
"name": "msal-node-extensions",
"rootPath": "extensions/msal-node-extensions"
},
{
"name": "msal-custom-auth",
"rootPath": "lib/msal-custom-auth"
}
]
}
4 changes: 4 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
/lib/msal-react/ @tnorling @jo-arroyo @peterzenz
/samples/msal-react-samples/ @tnorling @jo-arroyo @peterzenz

# MSAL Custom Auth
/lib/msal-custom-auth/ @yongdiw @shenj @albanx
/samples/msal-custom-auth-samples/ @yongdiw @shenj @albanx

# Build
/build/ @sameerag @tnorling @hectormmg @peterzenz
/release-scripts/ @sameerag @tnorling @hectormmg @peterzenz
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Expose components used by the msal-custom-auth",
"packageName": "@azure/msal-browser",
"email": "shen.jian@live.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Create a new package named msal-custom-auth. This package will be used for the exteral IDs about sign-in, sign-up, password-reset and retrieve accounts and tokens from cache.",
"packageName": "@azure/msal-custom-auth",
"email": "shen.jian@live.com",
"dependentChangeType": "none"
}
4 changes: 4 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ Once installed, you have the option to configure the jest environment for furthe
"name": "msal-react",
"rootPath": "lib/msal-react"
},
{
"name": "msal-custom-auth",
"rootPath": "lib/msal-custom-auth"
},
{
"name": "msal-node-extensions",
"rootPath": "extensions/msal-node-extensions"
Expand Down
Loading