We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3102590 commit 9fd365cCopy full SHA for 9fd365c
src/auth.ts
@@ -37,6 +37,9 @@ export async function getUser(
37
if (!isSuccess) {
38
39
if( errorCause === "missing Authorization header" ){
40
+ // Demo shortcut: we return 401 on missing Authorization, but a mixed
41
+ // public/private endpoint could instead return undefined here and let
42
+ // the caller decide whether to process an anonymous request.
43
console.warn("Anonymous request");
44
}else{
45
console.warn(debugErrorMessage);
0 commit comments