{"record":{"id":"939a648ab14b235f","repo":"pocketbase/pocketbase","slug":"the-user-is-not-active","errorCode":null,"errorMessage":"the user is not active","messagePattern":"the user is not active","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/auth/planningcenter.go","lineNumber":72,"sourceCode":"\n\textracted := struct {\n\t\tData struct {\n\t\t\tId         string `json:\"id\"`\n\t\t\tAttributes struct {\n\t\t\t\tStatus    string `json:\"status\"`\n\t\t\t\tName      string `json:\"name\"`\n\t\t\t\tAvatarURL string `json:\"avatar\"`\n\t\t\t\t// don't map the email because users can have multiple assigned\n\t\t\t\t// and it's not clear if they are verified\n\t\t\t}\n\t\t}\n\t}{}\n\tif err := json.Unmarshal(data, &extracted); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif extracted.Data.Attributes.Status != \"active\" {\n\t\treturn nil, errors.New(\"the user is not active\")\n\t}\n\n\tuser := &AuthUser{\n\t\tId:           extracted.Data.Id,\n\t\tName:         extracted.Data.Attributes.Name,\n\t\tAvatarURL:    extracted.Data.Attributes.AvatarURL,\n\t\tRawUser:      rawUser,\n\t\tAccessToken:  token.AccessToken,\n\t\tRefreshToken: token.RefreshToken,\n\t}\n\n\tuser.Expiry, _ = types.ParseDateTime(token.Expiry)\n\n\treturn user, nil\n}\n","sourceCodeStart":54,"sourceCodeEnd":88,"githubUrl":"https://github.com/pocketbase/pocketbase/blob/5d217ddb50cb144d80a5d0b0bdf11b52b2c3e457/tools/auth/planningcenter.go#L54-L88","documentation":"Thrown by the Planning Center auth provider when the user resource's `data.attributes.status` is anything other than \"active\" (e.g. \"inactive\", \"pending\", \"disabled\"). After a successful token exchange, the provider fetches the PCO identity endpoint and refuses login for non-active accounts. The status string is matched exactly, so any other value fails.","triggerScenarios":"OAuth login with a Planning Center person whose account status is not active; organization admin deactivated the person; the account is still in a pending/invitation state.","commonSituations":"User removed from a Planning Center organization but their OAuth grant/token is cached in a browser; imported accounts defaulting to a non-active status.","solutions":["Have a Planning Center admin set the person's status back to active in the organization.","If login was attempted with a stale session, clear it and re-run the full OAuth flow after reactivation.","Inspect RawUser to see the exact status string returned and confirm it is an account-state issue, not an API/schema change.","If your PCO instance uses an unexpected status vocabulary, verify the API response shape has not changed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"user, err := provider.FetchAuthUser(token)\nif err != nil && strings.Contains(err.Error(), \"the user is not active\") {\n    return errors.New(\"your Planning Center account is not active\")\n}","preventionTips":["Map this to a user-facing 'account inactive' message; retrying the same token will not help.","Sync PCO account status into your user store if you provision from it.","Check RawUser for the exact status string when triaging."],"tags":["planningcenter","auth","oauth","user-inactive","go"],"backgroundTag":null,"analyzedSha":"5d217ddb50cb144d80a5d0b0bdf11b52b2c3e457","analyzedAt":"2026-08-15T10:06:33.165Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}