Intro
Kinde x Nordcraft
This Package includes Kinde Authentication inside of Nordcraft. Currenty Supports: Authentication, Roles, Permissions, Token Refreshing.
Demo
Components
kinde-auth-context
Provides a Context for Auth related data, place this everywhere you need something auth related
Attributes
auth-callback-url The URL which Kinde uses for Callback client-id The Kinde Client ID from your Application kinde-url The Domain which your Kinde Instance is Hosted kinde-protected-page-context
This is required for all pages that are 'protected' and not publicly accessible
Attributes
redirect-to The URL to which the user is redirected after an issue occurs while checking the session client-id The Kinde Client ID from your Application kinde-url The Domain which your Kinde Instance is Hosted Events
onRefreshError Called when an error occurs during session refresh onRefreshSuccess Called after session refresh Formulars
isRefreshing Indicates whether a session refresh is in progress userData The Kinde User Profile Object kinde-user-permission-context
User Permission with possible check for required_cehck
Attributes
redirect-to The URL to which the user is redirected after an required_permission not match with user permission required_permission required permission kinde-url The Domain which your Kinde Instance is Hosted Formulars
userPermissions The Kinde User Permissions Object kinde-user-roles-context
User Roles with possible check for required_cehck
Attributes
redirect-to The URL to which the user is redirected after an required_permission not match with user permission required_role required role kinde-url The Domain which your Kinde Instance is Hosted Formulars
userRoles The Kinde User Roles Object kinde-auth-callback-handler
Handles the Callback from Kinde and handles the "real" signIn and safes refresh & access tokens, needs kinde-auth-context as parent
Events
onSuccess Called after successful signIn onError Called after failed signIn kinde-refresh-session-handler
Used for session update if protected route has error, needs kinde-auth-context as parent
Events
onError Called when error occurs during session refresh onSuccess Called when refresh was successful
Formulas
hasPermission
Simplified formular for checking if user has Permission
Arguments
userPermissions The userPermission Data from Auth Context requiredPermissons The Required Permission to get "true" value getKindeLoginUrl
Needs Kinde-Auth-Context arround
Arguments
login_hint See Kinde.com docs getKindeLogoutUrl
Provides the LogoutUrl for Kinde
Cookies
kinde_access_token The Access Token which can be used for requests etc... kinde_refresh_token Refresh Token (u don‘t need it)