Welcome to the Flows Auth repository! This library provides robust authentication solutions tailored for Thepia Flow applications, with a focus on modern security practices, including WebAuthn and passkey support.
To install the Flows Auth library, run the following command:
npm install flows-auth
Make sure to include the library in your Svelte project to start using its features.
Hereβs a basic example of how to implement Flows Auth in your Svelte application.
First, import the library into your Svelte component:
import { Auth } from 'flows-auth';
You can initialize the authentication process as follows:
const auth = new Auth({
// Your configuration options
clientId: 'YOUR_CLIENT_ID',
redirectUri: 'YOUR_REDIRECT_URI',
});
To log in a user, call the login
method:
auth.login()
.then(response => {
console.log('Login successful:', response);
})
.catch(error => {
console.error('Login failed:', error);
});
Logging out is just as straightforward:
auth.logout()
.then(() => {
console.log('Logout successful');
})
.catch(error => {
console.error('Logout failed:', error);
});
For WebAuthn, you can utilize the built-in methods to manage user credentials:
auth.registerWebAuthn()
.then(credential => {
console.log('WebAuthn registration successful:', credential);
})
.catch(error => {
console.error('WebAuthn registration failed:', error);
});
We welcome contributions! To contribute to Flows Auth, please follow these steps:
git checkout -b feature/YourFeature
).git commit -m 'Add some feature'
).git push origin feature/YourFeature
).This project is licensed under the MIT License. See the LICENSE file for details.
To download the latest version of Flows Auth, visit the Releases section. Make sure to execute the downloaded files as per the instructions provided.
For the latest updates, check the Releases section frequently.
For support, please open an issue in the GitHub repository. We aim to respond promptly to any questions or concerns.
Thanks to the Svelte community for their contributions and support. This library builds on the great work done by others in the field of web authentication.
For inquiries, you can reach out via the GitHub issues page or contact the repository owner directly.
By using Flows Auth, you can simplify the authentication process in your applications while ensuring a high level of security.