fix: correct localStorage token name from 'token' to 'authToken'

Fixed authentication token inconsistency in subscription pages:

Issue:
- Subscription pages were using localStorage.getItem('token')
- Rest of the app uses localStorage.getItem('authToken')
- This caused users to be redirected to login when accessing subscription pages

Files Fixed:
- app/[locale]/subscription/page.tsx
  * fetchUserData() function
  * handleUpgrade() function
  * handleManageSubscription() function
- app/[locale]/subscription/success/page.tsx
  * SuccessContent component verification
- components/subscription/usage-display.tsx
  * fetchUsageData() function

Result:
- Users can now access subscription pages when logged in
- Consistent authentication token naming across entire app
- No more unwanted redirects to login page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-12 22:35:34 +00:00
parent a667574d50
commit bc9fe1d9bb
3 changed files with 5 additions and 5 deletions

View File

@@ -45,7 +45,7 @@ export default function UsageDisplay({ compact = false, showUpgradeButton = true
const fetchUsageData = async () => {
try {
const token = localStorage.getItem('token')
const token = localStorage.getItem('authToken')
if (!token) {
setError(true)
setLoading(false)