Munchable is a gut-condition barcode scanner whose server deliberately holds almost nothing: an email address, a subscription record, and any product labels you contributed. The policy is at munchable.app/privacy . Every one of its 29 route handlers starts the same way.
const user = await getUser ( request ) ; if ( ! user ) return NextResponse . json ( { error : 'unauthorized' } , { status : 401 } ) ;
Enter fullscreen mode
Exit fullscreen mode
Eleven of them then do something else, and the something else is the subject of this post:
if ( user . isAnonymous ) { return NextResponse . json ( { error : 'account_required' } , { status : 403 } ) ; }
Enter fullscreen mode
Exit fullscreen mode
Twenty-one references to isAnonymous across thirteen files. And then:
$ grep -rn "signInAnonymously" apps packages $ echo $?…