Skip to content

Commit cff537b

Browse files
committed
💥 (#177) Depricates old auth struct
1 parent 2f3b89b commit cff537b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/utils/Auth.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const getUsers = () => {
4646
// Check if the user is still using previous schema type
4747
if (Array.isArray(auth)) {
4848
printWarning(); // Print warning message
49-
return auth; // Let the user proceed anyway, will remove in V 1.7.0
49+
return []; // Support for old data structure now removed
5050
}
5151
// Otherwise, return the users array, if available
5252
return auth.users || [];
@@ -95,12 +95,7 @@ export const isAuthEnabled = () => {
9595
/* Returns true if guest access is enabled */
9696
export const isGuestAccessEnabled = () => {
9797
const appConfig = getAppConfig();
98-
if (appConfig.enableGuestAccess) {
99-
// User is still using the old auth method
100-
printWarning();
101-
return true;
102-
}
103-
if (appConfig.auth && !Array.isArray(appConfig.auth)) {
98+
if (appConfig.auth && typeof appConfig.auth === 'object') {
10499
return appConfig.auth.enableGuestAccess || false;
105100
}
106101
return false;

0 commit comments

Comments
 (0)