aws-amplify / aws-amplify/docs
Bug in calling Auth Admin queries API
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
In this doc https://docs.amplify.aws/javascript/build-a-backend/auth/admin-actions/, the guide shows that calling API as below:
```
async function listEditors(limit){
let apiName = 'AdminQueries';
let path = '/listUsersInGroup';
let options = {
queryStringParameters: {
"groupname": "Editors",
"limit": limit,
},
headers: {
'Content-Type' : 'application/json',
Authorization: `${(await fetchAuthSession()).tokens.accessToken.payload}`
}
}
const response = await get({apiName, path, options});
return response;
}
```
But I think it missed `Bearer` keyword, specifically
```
Authorization: `Bearer ${(await fetchAuthSession()).tokens.accessToken.payload}`
```
And, please add tutorial to change auth function role from local env
Contributor guide
Assessment
This issue has not been assessed yet.