kinde-capacitor-plugin
v0.0.15
Published
Kinde Auth plugin for Capacitor
Downloads
32
Maintainers
Readme
Kinde Capacitor Plugin
Capacitor plugin for Kinde Authentication
Install
npm install kinde-capacitor-plugin
iOS Configuration
- Add to your
capacitor.config.json
:
"plugins": {
"kindeAuth": {
"domain": "plantquest.kinde.com",
"clientId": "example-client-id",
"redirectUri": "pqjnjih://callback"
}
}
- Add URL scheme to your iOS app's
Info.plist
:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>pqjnjih</string>
</array>
</dict>
</array>
Usage
typescript
import { KindeAuth } from 'kinde-capacitor-plugin';
// Login
await KindeAuth.login();
// Get user details
const { user, error } = await KindeAuth.getUserDetails();
// Check if user is authenticated
const { isAuthenticated } = await KindeAuth.isAuthenticated();
// Logout
await KindeAuth.logout();