@@ -518,7 +518,7 @@ describe('Authentication Flow', () => {
518518
519519 describe ( 'Callback Page' , ( ) => {
520520 describe ( 'Token Validation' , ( ) => {
521- const CALLBACK_URL = 'http://localhost:8080/callback '
521+ const TOKEN_URL = 'http://localhost:8080/token '
522522
523523 it ( 'should validate token with backend on mount' , async ( ) => {
524524 const inputToken = 'incoming-token-from-oauth'
@@ -538,7 +538,7 @@ describe('Authentication Flow', () => {
538538 const { token } = route . query
539539 if ( token ) {
540540 const response = await fetch (
541- `${ config . public . callbackUrl } ?token=${ token } ` ,
541+ `${ config . public . tokenUrl } ?token=${ token } ` ,
542542 { method : 'GET' } ,
543543 )
544544 if ( response && response . token ) {
@@ -548,7 +548,7 @@ describe('Authentication Flow', () => {
548548 }
549549
550550 expect ( fetch ) . toHaveBeenCalledWith (
551- `${ CALLBACK_URL } ?token=${ inputToken } ` ,
551+ `${ TOKEN_URL } ?token=${ inputToken } ` ,
552552 { method : 'GET' } ,
553553 )
554554 expect ( setAccessToken ) . toHaveBeenCalledWith ( validatedToken )
@@ -570,7 +570,7 @@ describe('Authentication Flow', () => {
570570 const config = mockUseRuntimeConfig ( )
571571
572572 const response = await fetch (
573- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
573+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
574574 )
575575 if ( response && response . token ) {
576576 setAccessToken ( response . token )
@@ -593,7 +593,7 @@ describe('Authentication Flow', () => {
593593 const config = mockUseRuntimeConfig ( )
594594
595595 const response = await fetch (
596- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
596+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
597597 )
598598 if ( response && response . token ) {
599599 setAccessToken ( response . token )
@@ -621,7 +621,7 @@ describe('Authentication Flow', () => {
621621 const config = mockUseRuntimeConfig ( )
622622
623623 const response = await fetch (
624- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
624+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
625625 )
626626 if ( response && response . token ) {
627627 setAccessToken ( response . token )
@@ -672,7 +672,7 @@ describe('Authentication Flow', () => {
672672
673673 try {
674674 const response = await fetch (
675- `${ config . public . callbackUrl } ?token=${ invalidToken } ` ,
675+ `${ config . public . tokenUrl } ?token=${ invalidToken } ` ,
676676 )
677677 if ( response && response . token ) {
678678 setAccessToken ( response . token )
@@ -703,7 +703,7 @@ describe('Authentication Flow', () => {
703703
704704 try {
705705 const response = await fetch (
706- `${ config . public . callbackUrl } ?token=${ expiredToken } ` ,
706+ `${ config . public . tokenUrl } ?token=${ expiredToken } ` ,
707707 )
708708 if ( response && response . token ) {
709709 setAccessToken ( response . token )
@@ -735,7 +735,7 @@ describe('Authentication Flow', () => {
735735
736736 try {
737737 const response = await fetch (
738- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
738+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
739739 )
740740 if ( response && response . token ) {
741741 setAccessToken ( response . token )
@@ -768,7 +768,7 @@ describe('Authentication Flow', () => {
768768
769769 try {
770770 const response = await fetch (
771- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
771+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
772772 )
773773 if ( response && response . token ) {
774774 setAccessToken ( response . token )
@@ -796,7 +796,7 @@ describe('Authentication Flow', () => {
796796 const config = mockUseRuntimeConfig ( )
797797
798798 const response = await fetch (
799- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
799+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
800800 )
801801 if ( response && response . token ) {
802802 setAccessToken ( response . token )
@@ -826,7 +826,7 @@ describe('Authentication Flow', () => {
826826 const config = mockUseRuntimeConfig ( )
827827
828828 const response = await fetch (
829- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
829+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
830830 )
831831 if ( response && response . token ) {
832832 setAccessToken ( response . token )
@@ -860,7 +860,7 @@ describe('Authentication Flow', () => {
860860 const config = mockUseRuntimeConfig ( )
861861
862862 const response = await fetch (
863- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
863+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
864864 )
865865 if ( response && response . token ) {
866866 setAccessToken ( response . token )
@@ -894,7 +894,7 @@ describe('Authentication Flow', () => {
894894 const config = mockUseRuntimeConfig ( )
895895
896896 const response = await fetch (
897- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
897+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
898898 )
899899 if ( response && response . token ) {
900900 setAccessToken ( response . token )
@@ -924,7 +924,7 @@ describe('Authentication Flow', () => {
924924 const config = mockUseRuntimeConfig ( )
925925
926926 try {
927- await fetch ( `${ config . public . callbackUrl } ?token=${ inputToken } ` )
927+ await fetch ( `${ config . public . tokenUrl } ?token=${ inputToken } ` )
928928 } catch ( error ) {
929929 console . error ( 'Token validation failed:' , error )
930930 }
@@ -948,7 +948,7 @@ describe('Authentication Flow', () => {
948948 const config = mockUseRuntimeConfig ( )
949949
950950 try {
951- await fetch ( `${ config . public . callbackUrl } ?token=${ inputToken } ` )
951+ await fetch ( `${ config . public . tokenUrl } ?token=${ inputToken } ` )
952952 } catch ( error ) {
953953 errorState . value =
954954 error instanceof Error ? error . message : 'Unknown error'
@@ -972,7 +972,7 @@ describe('Authentication Flow', () => {
972972
973973 try {
974974 const response = await fetch (
975- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
975+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
976976 )
977977 if ( response && response . token ) {
978978 setAccessToken ( response . token )
@@ -1003,7 +1003,7 @@ describe('Authentication Flow', () => {
10031003 // First attempt - fails
10041004 try {
10051005 const response = await fetch (
1006- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
1006+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
10071007 )
10081008 if ( response && response . token ) {
10091009 setAccessToken ( response . token )
@@ -1016,7 +1016,7 @@ describe('Authentication Flow', () => {
10161016
10171017 // Retry - succeeds
10181018 const response = await fetch (
1019- `${ config . public . callbackUrl } ?token=${ inputToken } ` ,
1019+ `${ config . public . tokenUrl } ?token=${ inputToken } ` ,
10201020 )
10211021 if ( response && response . token ) {
10221022 setAccessToken ( response . token )
@@ -1851,7 +1851,7 @@ describe('Authentication Flow', () => {
18511851 // Step 4: Token validated with backend
18521852 fetch . mockResolvedValue ( { token : validatedToken } )
18531853 const response = await fetch (
1854- `${ config . public . callbackUrl } ?token=${ oauthToken } ` ,
1854+ `${ config . public . tokenUrl } ?token=${ oauthToken } ` ,
18551855 )
18561856
18571857 // Step 5: Stored in cookie
@@ -2110,7 +2110,7 @@ describe('Authentication Flow', () => {
21102110 const config = mockUseRuntimeConfig ( )
21112111
21122112 const response = await fetch (
2113- `${ config . public . callbackUrl } ?token=${ tamperedToken } ` ,
2113+ `${ config . public . tokenUrl } ?token=${ tamperedToken } ` ,
21142114 )
21152115
21162116 // Tampered token should be rejected by backend
0 commit comments