mirror of
https://github.com/logto-io/logto.git
synced 2025-03-31 22:51:25 -05:00
chore: add comments
This commit is contained in:
parent
e5e378d1bb
commit
a2f20df9c9
1 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,12 @@ export const createJwtCustomizerLibrary = (
|
|||
const { findUserRoles } = userLibrary;
|
||||
const { attachResourceToScopes } = scopeLibrary;
|
||||
|
||||
/**
|
||||
* We does not include org roles' scopes for the following reason:
|
||||
* 1. The org scopes query method requires `limit` and `offset` parameters. Other management API get
|
||||
* these APIs from console setup while this library method is a backend used method.
|
||||
* 2. Logto developers can get the org roles' id from this user context and hence query the org roles' scopes via management API.
|
||||
*/
|
||||
const getUserContext = async (userId: string): Promise<JwtCustomizerUserContext> => {
|
||||
const user = await findUserById(userId);
|
||||
const fullSsoIdentities = await userSsoIdentities.findUserSsoIdentitiesByUserId(userId);
|
||||
|
|
Loading…
Add table
Reference in a new issue