Skip to content

Commit

Permalink
Merge pull request #2 from marmelab/fic-permissions-and-readme
Browse files Browse the repository at this point in the history
Fix permissions and readme
  • Loading branch information
slax57 authored Mar 3, 2023
2 parents 6518918 + 301806b commit f144c52
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/ra-auth-cognito/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 1.0.1

- Fix permissions might be null.
1 change: 1 addition & 0 deletions packages/ra-auth-cognito/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const App = () => {
authProvider={authProvider}
dataProvider={dataProvider}
title="Example Admin"
loginPage={false} // We don't need the login page in this case
>
<Resource name="posts" {...posts} />
</Admin>
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-auth-cognito/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ra-auth-cognito",
"version": "1.0.0",
"version": "1.0.1",
"repository": "[email protected]:marmelab/ra-auth-cognito.git",
"author": "Gildas Garcia <[email protected]> (https://marmelab.com/)",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-auth-cognito/src/authProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export const CognitoAuthProvider = (
return reject();
}
const token = session.getIdToken().decodePayload();
return resolve(token['cognito:groups']);
return resolve(token['cognito:groups'] ?? []);
});
});
},
Expand Down

0 comments on commit f144c52

Please sign in to comment.