@@ -135,7 +135,7 @@ export interface AuthClientOptions {
135
135
httpTimeout ?: number ;
136
136
enableTelemetry ?: boolean ;
137
137
enableAccessTokenEndpoint ?: boolean ;
138
- emptyProfileResponseWhenUnauthenticated ?: boolean ;
138
+ noContentProfileResponseWhenUnauthenticated ?: boolean ;
139
139
}
140
140
141
141
function createRouteUrl ( url : string , base : string ) {
@@ -170,7 +170,7 @@ export class AuthClient {
170
170
private authorizationServerMetadata ?: oauth . AuthorizationServer ;
171
171
172
172
private readonly enableAccessTokenEndpoint : boolean ;
173
- private readonly emptyProfileResponseWhenUnauthenticated : boolean ;
173
+ private readonly noContentProfileResponseWhenUnauthenticated : boolean ;
174
174
175
175
constructor ( options : AuthClientOptions ) {
176
176
// dependencies
@@ -260,8 +260,8 @@ export class AuthClient {
260
260
} ;
261
261
262
262
this . enableAccessTokenEndpoint = options . enableAccessTokenEndpoint ?? true ;
263
- this . emptyProfileResponseWhenUnauthenticated =
264
- options . emptyProfileResponseWhenUnauthenticated ?? false ;
263
+ this . noContentProfileResponseWhenUnauthenticated =
264
+ options . noContentProfileResponseWhenUnauthenticated ?? false ;
265
265
}
266
266
267
267
async handler ( req : NextRequest ) : Promise < NextResponse > {
@@ -584,7 +584,7 @@ export class AuthClient {
584
584
const session = await this . sessionStore . get ( req . cookies ) ;
585
585
586
586
if ( ! session ) {
587
- if ( this . emptyProfileResponseWhenUnauthenticated ) {
587
+ if ( this . noContentProfileResponseWhenUnauthenticated ) {
588
588
return new NextResponse ( null , {
589
589
status : 204
590
590
} ) ;
0 commit comments