-- generateClient with QuickstartConfigs --. TestGenerateClient_AllQuickstartConfigs verifies the management.Client fields produced by generateClient for every app type in auth0.QuickstartConfigs.
(t *testing.T)
| 457 | // TestGenerateClient_AllQuickstartConfigs verifies the management.Client fields |
| 458 | // produced by generateClient for every app type in auth0.QuickstartConfigs. |
| 459 | func TestGenerateClient_AllQuickstartConfigs(t *testing.T) { |
| 460 | t.Parallel() |
| 461 | |
| 462 | tests := []struct { |
| 463 | configKey string |
| 464 | port int |
| 465 | wantAppType string |
| 466 | wantCallbacksLen int |
| 467 | wantCallback string |
| 468 | wantLogoutURLsLen int |
| 469 | wantWebOriginsLen int |
| 470 | }{ |
| 471 | // SPA: callback = baseURL (no /callback suffix). |
| 472 | {"spa:react:vite", 5173, "spa", 1, "http://localhost:5173", 1, 1}, |
| 473 | {"spa:vue:vite", 5173, "spa", 1, "http://localhost:5173", 1, 1}, |
| 474 | {"spa:svelte:vite", 5173, "spa", 1, "http://localhost:5173", 1, 1}, |
| 475 | {"spa:vanilla-javascript:vite", 5173, "spa", 1, "http://localhost:5173", 1, 1}, |
| 476 | {"spa:angular:none", 4200, "spa", 1, "http://localhost:4200", 1, 1}, |
| 477 | {"spa:flutter-web:none", 3000, "spa", 1, "http://localhost:3000", 1, 1}, |
| 478 | // Regular web: framework-specific paths. |
| 479 | {"regular:nextjs:none", 3000, "regular_web", 1, "http://localhost:3000/auth/callback", 1, 0}, |
| 480 | {"regular:fastify:none", 3000, "regular_web", 1, "http://localhost:3000/auth/callback", 1, 0}, |
| 481 | {"regular:nuxt:none", 3000, "regular_web", 1, "http://localhost:3000/auth/callback", 1, 0}, |
| 482 | {"regular:express:none", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 483 | {"regular:hono:none", 3000, "regular_web", 1, "http://localhost:3000/auth/callback", 1, 0}, |
| 484 | {"regular:vanilla-python:none", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 485 | // Flask detection sets port 5000 (Flask's historical default). |
| 486 | {"regular:vanilla-python:none", 5000, "regular_web", 1, "http://localhost:5000/callback", 1, 0}, |
| 487 | {"regular:sveltekit:none", 3000, "regular_web", 1, "http://localhost:3000/auth/callback", 1, 0}, |
| 488 | {"regular:sveltekit:vite", 3000, "regular_web", 1, "http://localhost:3000/auth/callback", 1, 0}, |
| 489 | {"regular:django:none", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 490 | // Django detection (manage.py or requirements.txt) sets port 8000 (Django dev server default). |
| 491 | {"regular:django:none", 8000, "regular_web", 1, "http://localhost:8000/callback", 1, 0}, |
| 492 | {"regular:vanilla-go:none", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 493 | {"regular:laravel:composer", 8000, "regular_web", 1, "http://localhost:8000/callback", 1, 0}, |
| 494 | {"regular:rails:none", 3000, "regular_web", 1, "http://localhost:3000/auth/auth0/callback", 1, 0}, |
| 495 | {"regular:jhipster:none", 8080, "regular_web", 1, "http://localhost:8080/login/oauth2/code/oidc", 1, 0}, |
| 496 | {"regular:aspnet-mvc:none", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 497 | {"regular:aspnet-blazor:none", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 498 | {"regular:aspnet-owin:none", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 499 | {"regular:vanilla-php:composer", 3000, "regular_web", 1, "http://localhost:3000/callback", 1, 0}, |
| 500 | {"regular:vanilla-java:maven", 8080, "regular_web", 1, "http://localhost:8080/callback", 1, 0}, |
| 501 | {"regular:java-ee:maven", 8080, "regular_web", 1, "http://localhost:8080/callback", 1, 0}, |
| 502 | {"regular:spring-boot:maven", 8080, "regular_web", 1, "http://localhost:8080/login/oauth2/code/okta", 1, 0}, |
| 503 | {"regular:spring-boot:gradle", 8080, "regular_web", 1, "http://localhost:8080/login/oauth2/code/okta", 1, 0}, |
| 504 | // Native: static callback URLs appropriate per framework. |
| 505 | // Flutter and React Native use bundle-ID-specific custom URI schemes; unknown at setup time. |
| 506 | {"native:flutter:none", 0, "native", 0, "", 0, 0}, |
| 507 | {"native:react-native:none", 0, "native", 0, "", 0, 0}, |
| 508 | // Expo uses the standard Expo Go redirect URI. |
| 509 | {"native:expo:none", 0, "native", 1, "exp://localhost:19000", 1, 0}, |
| 510 | // Ionic (Capacitor) intercepts http://localhost redirects. |
| 511 | {"native:ionic-angular:none", 0, "native", 1, "http://localhost", 1, 0}, |
| 512 | {"native:ionic-react:vite", 0, "native", 1, "http://localhost", 1, 0}, |
| 513 | {"native:ionic-vue:vite", 0, "native", 1, "http://localhost", 1, 0}, |
| 514 | // .NET Mobile and MAUI use bundle-ID-specific custom URI schemes; unknown at setup time. |
| 515 | {"native:dotnet-mobile:none", 0, "native", 0, "", 0, 0}, |
| 516 | {"native:maui:none", 0, "native", 0, "", 0, 0}, |
nothing calls this directly
no test coverage detected