on 2021 Jul 15 9:43 AM
Hello,
I have a local configuration for a CAP project which is using Mock Authentication:
"auth": {
"strategy": "mock",
"users": {
"gigel": {
"password": "developer",
"roles": ["authenticated-user"]
}
}
}
I need to implement an endpoint which exposes the First Name and Family Name of a user.
I was looking for a way to implement it and update my mock auth configuration in such a way that both in development and in the deployed app which uses JWT auth the same implementation works.
I tried to use:
"auth": {
"strategy": "mock",
"users": {
"mock": {
"password": "developer",
"roles": ["authenticated-user"],
"userAttributes": {
"firstName": "Mock",
"familyName": "Developer"
}
}
}
}
But I don't see the attributes in req.user.
Is it possible to configure Mock Auth for this use case? What is the recommended way for this?
Kind regards,
Stefania
User | Count |
---|---|
73 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.