Skip to content

Commit

Permalink
Revert "fix(nextjs,clerk-react,backend): Utility has is undefined w…
Browse files Browse the repository at this point in the history
…hen user is signed out"

This reverts commit cf736cc
  • Loading branch information
panteliselef committed Dec 11, 2023
1 parent 4cc0515 commit a4aa0e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/backend/src/tokens/authObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { createBackendApiClient } from '../api';
type AuthObjectDebugData = Record<string, any>;
type CreateAuthObjectDebug = (data?: AuthObjectDebugData) => AuthObjectDebug;
type AuthObjectDebug = () => AuthObjectDebugData;
type CheckAuthorizationSignedOut = undefined;

export type SignedInAuthObjectOptions = CreateBackendApiOptions & {
token: string;
Expand Down Expand Up @@ -53,7 +52,7 @@ export type SignedOutAuthObject = {
orgPermissions: null;
organization: null;
getToken: ServerGetToken;
has: CheckAuthorizationSignedOut;
has: CheckAuthorizationWithCustomPermissions;
debug: AuthObjectDebug;
};

Expand Down Expand Up @@ -127,7 +126,7 @@ export function signedOutAuthObject(debugData?: AuthObjectDebugData): SignedOutA
orgPermissions: null,
organization: null,
getToken: () => Promise.resolve(null),
has: undefined,
has: () => false,
debug: createDebug(debugData),
};
}
Expand Down

0 comments on commit a4aa0e7

Please sign in to comment.