{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: AuthService"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/readme"},"children":["PERS SDK - v2.3.26"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/modules"},"children":["Exports"]}," / AuthService"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-authservice","__idx":0},"children":["Class: AuthService"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Platform-agnostic authentication service"," ","Handles login, token refresh, and storage operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":1},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructors","__idx":2},"children":["Constructors"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#constructor"},"children":["constructor"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"methods","__idx":3},"children":["Methods"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#logintenantadmin"},"children":["loginTenantAdmin"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#loginuser"},"children":["loginUser"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#loginbusiness"},"children":["loginBusiness"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#loginuserwithrawdata"},"children":["loginUserWithRawData"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#refreshaccesstoken"},"children":["refreshAccessToken"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#cleartokens"},"children":["clearTokens"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#isfatalautherror"},"children":["isFatalAuthError"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#isdefinitiveauthfailure"},"children":["isDefinitiveAuthFailure"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#handleauthfailure"},"children":["handleAuthFailure"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#attemptprovidertokenrecovery"},"children":["attemptProviderTokenRecovery"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#hasvalidauth"},"children":["hasValidAuth"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#getcurrentuser"},"children":["getCurrentUser"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#getcurrentbusiness"},"children":["getCurrentBusiness"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice#getcurrentadmin"},"children":["getCurrentAdmin"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"constructors-1","__idx":4},"children":["Constructors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructor","__idx":5},"children":["constructor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new AuthService"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authApi"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authProvider?"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AuthService"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":6},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authApi"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authapi"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AuthApi"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authProvider?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/tokenstorageprovider"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TokenStorageProvider"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":7},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authservice"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AuthService"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in","__idx":8},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L66"},"children":["core/auth/services/auth-service.ts:66"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods-1","__idx":9},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"logintenantadmin","__idx":10},"children":["loginTenantAdmin"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["loginTenantAdmin"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jwt"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Login tenant admin with JWT"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":11},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jwt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Authentication token (Firebase JWT)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/tenantauthoptions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TenantAuthOptions"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Tenant authentication options (tenantId for multi-tenant admins)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":12},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Session response with tenant context"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Throws"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Error with code MULTIPLE_CONTEXT_SELECTION_REQUIRED when tenantId is required but not provided"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-1","__idx":13},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L109"},"children":["core/auth/services/auth-service.ts:109"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"loginuser","__idx":14},"children":["loginUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["loginUser"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jwt"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Login user with JWT"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-2","__idx":15},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jwt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":16},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-2","__idx":17},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L122"},"children":["core/auth/services/auth-service.ts:122"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"loginbusiness","__idx":18},"children":["loginBusiness"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["loginBusiness"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jwt"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Login as business with JWT"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authenticates a user in a business context. The returned JWT contains"," ","the user's role within that business."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-3","__idx":19},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jwt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Authentication token (passkey or Firebase JWT)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/businessauthoptions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessAuthOptions"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Business authentication options (businessId for multi-business users)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":20},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Session response with business context and role baked into JWT"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Throws"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MultipleContextSelectionRequiredError when businessId is required but not provided"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Auto-select if single membership\nconst response = await authService.loginBusiness(jwt);\n\n// Explicit business selection\nconst response = await authService.loginBusiness(jwt, { businessId: 'biz-123' });\nconsole.log('Business:', response.business?.displayName);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-3","__idx":21},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L153"},"children":["core/auth/services/auth-service.ts:153"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"loginuserwithrawdata","__idx":22},"children":["loginUserWithRawData"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["loginUserWithRawData"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rawLoginData"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Login user with raw data (no external auth)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-4","__idx":23},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rawLoginData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/rawuserdata"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RawUserData"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-4","__idx":24},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthContextResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-4","__idx":25},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L166"},"children":["core/auth/services/auth-service.ts:166"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"refreshaccesstoken","__idx":26},"children":["refreshAccessToken"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["refreshAccessToken"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refreshToken?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refresh access token with race condition protection"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-5","__idx":27},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refreshToken?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-5","__idx":28},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionAuthResponseDTO"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-5","__idx":29},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L179"},"children":["core/auth/services/auth-service.ts:179"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cleartokens","__idx":30},"children":["clearTokens"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["clearTokens"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clear stored tokens and active refresh operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-6","__idx":31},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-6","__idx":32},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L225"},"children":["core/auth/services/auth-service.ts:225"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isfatalautherror","__idx":33},"children":["isFatalAuthError"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["isFatalAuthError"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check if an error code indicates a fatal auth failure."," ","Fatal errors require immediate logout - the session cannot be recovered."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-6","__idx":34},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["undefined"]}," | ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-7","__idx":35},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-7","__idx":36},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L237"},"children":["core/auth/services/auth-service.ts:237"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isdefinitiveauthfailure","__idx":37},"children":["isDefinitiveAuthFailure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["isDefinitiveAuthFailure"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Comprehensive check if an error represents a DEFINITIVE auth failure."," ","This is the SINGLE SOURCE OF TRUTH for determining if logout is required."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns true for:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Known fatal error codes (REFRESH_TOKEN_EXPIRED, TOKEN_REVOKED, etc.)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Fatal error codes in error messages (wrapped errors)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns false for (retryable/recoverable):"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Network errors"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Timeouts"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["5xx server errors"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TOKEN_EXPIRED (normal refresh trigger)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Raw 401/403 without fatal code (should try refresh first)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["NOTE: We intentionally DO NOT treat raw 401/403 status as fatal."," ","The HTTP client handles 401 by attempting token refresh first."," ","Only if refresh fails WITH a fatal code do we logout."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-7","__idx":38},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unknown"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-8","__idx":39},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-8","__idx":40},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L260"},"children":["core/auth/services/auth-service.ts:260"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"handleauthfailure","__idx":41},"children":["handleAuthFailure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["handleAuthFailure"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Handle authentication failure with provider token recovery."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before logging out, attempts to recover the session using the stored"," ","provider token (Firebase JWT, etc.) if it's still valid."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recovery Flow:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check if provider token exists and is not expired"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Get the auth type (USER, BUSINESS, TENANT) to know which login to use"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Attempt re-authentication with provider token"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If successful: Session recovered, stay logged in"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If failed: Clear tokens and emit AUTH_FAILED"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-9","__idx":42},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-9","__idx":43},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L300"},"children":["core/auth/services/auth-service.ts:300"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"attemptprovidertokenrecovery","__idx":44},"children":["attemptProviderTokenRecovery"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["attemptProviderTokenRecovery"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Attempt to recover session using stored provider token."," ","Extracts context (tenantId/businessId) from the current refresh token to ensure"," ","the recovered session maintains the same context."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is a PUBLIC method that can be called by TokenRefreshManager when internal"," ","refresh fails, to try external (provider token) recovery before giving up."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-10","__idx":45},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["true if session was successfully recovered"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-10","__idx":46},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L359"},"children":["core/auth/services/auth-service.ts:359"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"hasvalidauth","__idx":47},"children":["hasValidAuth"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["hasValidAuth"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check if we have valid authentication tokens"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-11","__idx":48},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-11","__idx":49},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L433"},"children":["core/auth/services/auth-service.ts:433"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getcurrentuser","__idx":50},"children":["getCurrentUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getCurrentUser"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get current authenticated user"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-12","__idx":51},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserDTO"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-12","__idx":52},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L446"},"children":["core/auth/services/auth-service.ts:446"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getcurrentbusiness","__idx":53},"children":["getCurrentBusiness"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getCurrentBusiness"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get current business context"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-13","__idx":54},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessDTO"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-13","__idx":55},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L453"},"children":["core/auth/services/auth-service.ts:453"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getcurrentadmin","__idx":56},"children":["getCurrentAdmin"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getCurrentAdmin"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AdminDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get current admin context"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-14","__idx":57},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AdminDTO"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-14","__idx":58},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/core/auth/services/auth-service.ts#L460"},"children":["core/auth/services/auth-service.ts:460"]}]}]},"headings":[{"value":"Class: AuthService","id":"class-authservice","depth":1},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Constructors","id":"constructors","depth":3},{"value":"Methods","id":"methods","depth":3},{"value":"Constructors","id":"constructors-1","depth":2},{"value":"constructor","id":"constructor","depth":3},{"value":"Parameters","id":"parameters","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"Defined in","id":"defined-in","depth":4},{"value":"Methods","id":"methods-1","depth":2},{"value":"loginTenantAdmin","id":"logintenantadmin","depth":3},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Returns","id":"returns-1","depth":4},{"value":"Defined in","id":"defined-in-1","depth":4},{"value":"loginUser","id":"loginuser","depth":3},{"value":"Parameters","id":"parameters-2","depth":4},{"value":"Returns","id":"returns-2","depth":4},{"value":"Defined in","id":"defined-in-2","depth":4},{"value":"loginBusiness","id":"loginbusiness","depth":3},{"value":"Parameters","id":"parameters-3","depth":4},{"value":"Returns","id":"returns-3","depth":4},{"value":"Defined in","id":"defined-in-3","depth":4},{"value":"loginUserWithRawData","id":"loginuserwithrawdata","depth":3},{"value":"Parameters","id":"parameters-4","depth":4},{"value":"Returns","id":"returns-4","depth":4},{"value":"Defined in","id":"defined-in-4","depth":4},{"value":"refreshAccessToken","id":"refreshaccesstoken","depth":3},{"value":"Parameters","id":"parameters-5","depth":4},{"value":"Returns","id":"returns-5","depth":4},{"value":"Defined in","id":"defined-in-5","depth":4},{"value":"clearTokens","id":"cleartokens","depth":3},{"value":"Returns","id":"returns-6","depth":4},{"value":"Defined in","id":"defined-in-6","depth":4},{"value":"isFatalAuthError","id":"isfatalautherror","depth":3},{"value":"Parameters","id":"parameters-6","depth":4},{"value":"Returns","id":"returns-7","depth":4},{"value":"Defined in","id":"defined-in-7","depth":4},{"value":"isDefinitiveAuthFailure","id":"isdefinitiveauthfailure","depth":3},{"value":"Parameters","id":"parameters-7","depth":4},{"value":"Returns","id":"returns-8","depth":4},{"value":"Defined in","id":"defined-in-8","depth":4},{"value":"handleAuthFailure","id":"handleauthfailure","depth":3},{"value":"Returns","id":"returns-9","depth":4},{"value":"Defined in","id":"defined-in-9","depth":4},{"value":"attemptProviderTokenRecovery","id":"attemptprovidertokenrecovery","depth":3},{"value":"Returns","id":"returns-10","depth":4},{"value":"Defined in","id":"defined-in-10","depth":4},{"value":"hasValidAuth","id":"hasvalidauth","depth":3},{"value":"Returns","id":"returns-11","depth":4},{"value":"Defined in","id":"defined-in-11","depth":4},{"value":"getCurrentUser","id":"getcurrentuser","depth":3},{"value":"Returns","id":"returns-12","depth":4},{"value":"Defined in","id":"defined-in-12","depth":4},{"value":"getCurrentBusiness","id":"getcurrentbusiness","depth":3},{"value":"Returns","id":"returns-13","depth":4},{"value":"Defined in","id":"defined-in-13","depth":4},{"value":"getCurrentAdmin","id":"getcurrentadmin","depth":3},{"value":"Returns","id":"returns-14","depth":4},{"value":"Defined in","id":"defined-in-14","depth":4}],"frontmatter":{"seo":{"title":"Class: AuthService"}},"lastModified":"2026-08-21T18:40:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-reference/classes/authservice","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}