/api/ws/auth/sign-upScope: Page-specific
UI usage: Create ny bruker fra registrationsmodal
Response fields used: data.uid, message
Overview
Docs HomeWorkshop StartCarOwner StartWorkshop Onboarding
Get Started01 API key setup02 API key in requests03 Auth testing04 Bearer token callsCollections
Platform API Collection (Soft Launch)Soft Launch All EndpointsSoft Launch InteractiveFundamentalsCanonical SpecAPI Reference
API RootWorkshop IndexWorkshop InteractiveWorkshop Auth InteractiveAll Workshop EndpointsCarOwner IndexCarOwner InteractiveCarOwner Auth InteractiveAll CarOwner EndpointsCore/Common IndexCore InteractiveAll Core EndpointsWorkshop Namespaces
AuthUserProfileWorkshopCoreWorkshopOwnershipRequestContactsAddressesOpeningHoursServicesManagersCertificatesSocialMediaBookingsRatingsServiceHistoryEmailVerificationNotificationsMessagesBrregLookupBookingStatusesCategoriesReportsServiceRecordsUsersAccessV2RealtimePresenceSupportCarOwner Namespaces
AuthBookingBookingStatusCarBrandsCarOwnerPaymentsCarOwnerServiceRecordsCategoriesFavoritesMarketplaceMarketplaceCompatMarketplaceFiltersMessagesNotificationsPresenceProfileRatingsRealtimeServiceLogSettingsVehiclesCore Namespaces
CoreVehicleServiceHistoryWorkshopCommonCarOwnerCommonPage Introduction
This contract page maps concrete frontend page behavior to API calls, payloads, and response fields.
Platform Page Contract
## Page purpose Landing pagen (`/`) handles: - login - registration - email-verified activation før login
Source: API-DOC/page-api-mapping/01-ladningside.md
| Method | Path | Scope | UI usage | Test |
|---|---|---|---|---|
| POST | /api/ws/auth/sign-up | Page-specific | Create ny bruker fra registrationsmodal | Try-It |
| POST | /api/ws/auth/sign-in | Global auth flow | Innlogging via NextAuth credentials | Try-It |
| GET | /api/ws/profile | Global auth flow | Fetchs i NextAuth etter sign-in to berike session | Try-It |
| GET | /api/ws/email-verification/confirm | Page-related (e-postflyt) | Triggeres fra knapp i verifiseringsmail (ikke direkte fra UI-kode) | Try-It |
/api/ws/auth/sign-upScope: Page-specific
UI usage: Create ny bruker fra registrationsmodal
Response fields used: data.uid, message
/api/ws/auth/sign-inScope: Global auth flow
UI usage: Innlogging via NextAuth credentials
Response fields used: data.token, data.user.uid, data.user.orgNr, data.user.username, data.user.profileImage, data.user.verifiedOwner
/api/ws/profileScope: Global auth flow
UI usage: Fetchs i NextAuth etter sign-in to berike session
Response fields used: email, display_name, profile_image, verified_org (normalisert i frontend)
/api/ws/email-verification/confirmScope: Page-related (e-postflyt)
UI usage: Triggeres fra knapp i verifiseringsmail (ikke direkte fra UI-kode)
Response fields used: confirmation/error message for email verification
Interactive console below is filtered to endpoints mapped for this page contract.
Landing pagen (/) handles:
src/app/page.tsx: controls modal-flyt (login/register/confirmation)src/features/auth/LoginModal.tsx: signIn('credentials')src/features/auth/RegisterModal.tsx: registerUser(...)src/pages/api/auth/[...nextauth].ts: credentials-authorize against backend (loginUser, getUserProfile)| Scope | Method | Endpoint | UI usage | Request from frontend | Response fields used by frontend |
|---|---|---|---|---|---|
| Page-specific | POST |
/api/ws/auth/sign-up |
Create ny bruker fra registrationsmodal | email, password, display_name, phone_number, valgfri file (profilbilde) |
data.uid, message |
| Global auth flow | POST |
/api/ws/auth/sign-in |
Innlogging via NextAuth credentials | email, password (+ x-api-key) |
data.token, data.user.uid, data.user.orgNr, data.user.username, data.user.profileImage, data.user.verifiedOwner |
| Global auth flow | GET |
/api/ws/profile |
Fetchs i NextAuth etter sign-in to berike session | Bearer-token | email, display_name, profile_image, verified_org (normalisert i frontend) |
| Page-related (e-postflyt) | GET |
/api/ws/email-verification/confirm?token=... |
Triggeres fra knapp i verifiseringsmail (ikke direkte fra UI-kode) | token i query |
confirmation/error message for email verification |
/api/auth/callback/credentials) før backend-endepunkt kalles.