-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(authentication, types, utils): Add Authentication provider scopes (
#6228) * initial implementation * add test for invalid scope * get config from scope not db * assign config from scope * fix package.json * optional providers * make providers options * update type
- Loading branch information
Showing
10 changed files
with
150 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ describe("AuthenticationModuleService - AuthProvider", () => { | |
email: "[email protected]", | ||
password: password, | ||
}, | ||
scope: "store", | ||
}) | ||
|
||
expect(res).toEqual({ | ||
|
@@ -91,6 +92,7 @@ describe("AuthenticationModuleService - AuthProvider", () => { | |
|
||
const res = await service.authenticate("usernamePassword", { | ||
body: { email: "[email protected]" }, | ||
scope: "store", | ||
}) | ||
|
||
expect(res).toEqual({ | ||
|
@@ -104,6 +106,7 @@ describe("AuthenticationModuleService - AuthProvider", () => { | |
|
||
const res = await service.authenticate("usernamePassword", { | ||
body: { password: "supersecret" }, | ||
scope: "store", | ||
}) | ||
|
||
expect(res).toEqual({ | ||
|
@@ -136,6 +139,7 @@ describe("AuthenticationModuleService - AuthProvider", () => { | |
email: "[email protected]", | ||
password: "password", | ||
}, | ||
scope: "store", | ||
}) | ||
|
||
expect(res).toEqual({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.