https://github.com/coldbox-modules/cbsecurity-passkeys
Passkey support for cbSecurity and ColdBox applications
https://github.com/coldbox-modules/cbsecurity-passkeys
Last synced: 6 months ago
JSON representation
Passkey support for cbSecurity and ColdBox applications
- Host: GitHub
- URL: https://github.com/coldbox-modules/cbsecurity-passkeys
- Owner: coldbox-modules
- Created: 2024-05-15T20:18:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-01T16:32:39.000Z (9 months ago)
- Last Synced: 2025-06-19T14:53:03.335Z (7 months ago)
- Language: ColdFusion
- Size: 271 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# CBSecurity Passkeys
## Requirements
- ColdBox 6+
- cbSecurity 3+
## Installation
1. Install CBSecurity Passkeys
`box install cbsecurity-passkeys`
2. Add Java libs from cbsecurity-passkeys
```js
this.javaSettings = {
loadPaths : [ "./modules/cbsecurity-passkeys/lib" ],
loadColdFusionClassPath : true,
reloadOnChange : true
};
```
3. Implement the `ICredentialRepository` interface. (See an example in `/resources/examples/quick/Passkey.cfc`)
4. Configure your `credentialRepositoryMapping` in `config/ColdBox.cfc`
```js
moduleSettings = {
"cbsecurity-passkeys": {
"credentialRepositoryMapping": "Passkey"
}
}
```
5. Configure at least one (1) `allowedOrigins`
```js
moduleSettings = {
"cbsecurity-passkeys": {
"credentialRepositoryMapping": "Passkey",
"allowedOrigins": [ "example.com" ]
}
}
```
Integrate using the `includes/passkeys.js` library:
```html
if ( await window.cbSecurity.passkeys.isSupported() ) {
await window.cbSecurity.passkeys.register(
// redirectLocation ("/")
);
}
if ( await window.cbSecurity.passkeys.isSupported() ) {
await window.cbSecurity.passkeys.login(
// username (optional)
// redirectLocation ("/")
// additionalParams ({})
)
}
window.cbSecurity.passkeys.autocomplete(
// redirectLocation ("/")
// additionalParams ({})
);
```