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 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 userPermissions The Kinde User Permissions Object userRoles The Kinde User Roles Object kinde-permission-guard
This is required for all pages that are 'protected' and not publicly accessible
Attributes
required-permission The Permission the User is Required to see Content Slots
default Shows Content if User has right Permission no-permission If the User hasn't the right Permission 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 kinde-logout-button
Provides an "A-TAG" which holds the Logout URL from Kinde, onClick it removes the Auth related Cookies
kinde-login-button
Provides an "A-TAG" which holds the Login URL from Kinde
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
Cookies
kinde_access_token The Access Token which can be used for requests etc... kinde_refresh_token Refresh Token (u don‘t need it)