Commit Graph

40 Commits

Author SHA1 Message Date
cbe6270494 feat: add passkey and 2FA document action auth options (#1065)
## Description

Add the following document action auth options:
- 2FA
- Passkey

If the user does not have the required auth setup, we onboard them
directly.

## Changes made

Note: Added secondaryId to the VerificationToken schema

## Testing Performed

Tested locally, pending preview tests

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have added/updated tests that prove the effectiveness of these
changes.
- [X] I have followed the project's coding style guidelines.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced components for 2FA, account, and passkey authentication
during document signing.
- Added "Require passkey" option to document settings and signer
authentication settings.
- Enhanced form submission and loading states for improved user
experience.
- **Refactor**
- Optimized authentication components to efficiently support multiple
authentication methods.
- **Chores**
- Updated and renamed functions and components for clarity and
consistency across the authentication system.
- Refined sorting options and database schema to support new
authentication features.
- **Bug Fixes**
- Adjusted SignInForm to verify browser support for WebAuthn before
proceeding.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-31 15:49:12 +08:00
5210fe2963 feat: add passkeys (#989)
## Description

Add support to login with passkeys.

Passkeys can be added via the user security settings page.

Note: Currently left out adding the type of authentication method for
the 'user security audit logs' because we're using the `signIn`
next-auth event which doesn't appear to provide the context. Will look
into it at another time.

## Changes Made

- Add passkeys to login
- Add passkeys feature flag
- Add page to manage passkeys
- Add audit logs relating to passkeys
- Updated prisma schema to support passkeys & anonymous verification
tokens

## Testing Performed

To be done.

MacOS:
- Safari  
- Chrome  
- Firefox 

Windows:
- Chrome [Untested] 
- Firefox [Untested]

Linux:
- Chrome [Untested]
- Firefox [Untested]

iOS:
- Safari 

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [X] I have tested these changes locally and they work as expected.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced Passkey authentication, including creation, sign-in, and
management of passkeys.
- Added a Passkeys section in Security Settings for managing user
passkeys.
- Implemented UI updates for Passkey authentication, including a new
dialog for creating passkeys and a data table for managing them.
- Enhanced security settings with server-side feature flags to
conditionally display new security features.
- **Bug Fixes**
	- Improved UI consistency in the Settings Security Activity Page.
- Updated button styling in the 2FA Recovery Codes component for better
visibility.
- **Refactor**
- Streamlined authentication options to include WebAuthn credentials
provider.
- **Chores**
- Updated database schema to support passkeys and related functionality.
	- Added new audit log types for passkey-related activities.
- Enhanced server-only authentication utilities for passkey registration
and management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-26 21:11:59 +08:00
cffb7907b5 chore: remove bcrypt 2024-03-07 18:30:22 +11:00
fe2093fe7c feat: add next-runtime-env (#869)
This PR adds the package
[next-runtime-env](https://github.com/expatfile/next-runtime-env/) to
populate the public environment variables at runtime.
2024-02-15 22:10:21 +11:00
d052f02013 chore: refactor code 2024-02-13 06:01:25 +00:00
149f416be7 chore: refactor code 2024-02-13 07:50:22 +02:00
d13cf743bf Merge branch 'main' into feat/add-runtime-env 2024-02-08 22:06:59 +11:00
cad48236a0 Merge branch 'main' into feat/disable-access-unverified-users 2024-02-07 16:30:22 +11:00
08f82b23dc fix: update env entries to evaluate at runtime 2024-01-31 22:32:42 +11:00
ada46a5f47 feat: add auth fail logs 2024-01-31 12:27:40 +11:00
cc090adce0 chore: refactor 2024-01-30 12:54:48 +02:00
7e15058a3a feat: add user security audit logs 2024-01-30 17:32:20 +11:00
49ecfc1a2c chore: refactor 2024-01-25 15:42:40 +02:00
ffee2b2c9a chore: merged main 2024-01-25 13:43:11 +02:00
2f18518961 chore: merged main 2024-01-25 10:53:05 +02:00
d451a7acce feat: add next-runtime-env 2024-01-25 10:48:20 +02:00
e90dd518df fix: auto verify google sso emails (#856) 2024-01-25 13:30:50 +11:00
4aefb80989 feat: restrict app access for unverified users 2024-01-16 14:25:05 +02:00
682cb37786 fix: update auth-options 2023-12-15 20:41:54 +11:00
ee5ce78c82 chore: remove unused code 2023-12-09 11:48:46 +05:30
78a1ee2af0 feat: disable oauth signup when DISABLE_SIGNUP is true 2023-12-09 11:35:45 +05:30
792158c2cb feat: add two factor auth (#643)
Add two factor authentication for users who wish to enhance the security of their accounts.
2023-12-01 20:06:32 +11:00
c054fc78a4 fix: resolve issues with emailVerified jwt property 2023-11-23 15:11:37 +11:00
fbbc3b89c3 feat: email verification for registration (#599) 2023-11-21 15:44:04 +11:00
f7d8ebb9de feat: enable resend email menu (#496) 2023-11-16 13:08:31 +11:00
fe25239a4e feat: cache getServerComponentSession calls (#644) 2023-11-15 17:42:27 +11:00
4af3d05a24 fix: updates from error logs 2023-11-06 13:02:21 +11:00
ec1f61faa0 feat: add user schema timestamps 2023-11-06 13:02:20 +11:00
c343e8a221 feat: plan limits 2023-11-06 13:02:19 +11:00
5cba913c55 fix: resolve issues with signing document stickiness 2023-11-06 13:01:46 +11:00
f42f2b1aa0 chore: feedback improvements 2023-11-06 13:01:12 +11:00
6ad10f6317 fix: tidy up code 2023-11-06 13:01:12 +11:00
7811035384 feat: promise safety with eslint 2023-11-06 13:01:11 +11:00
7a74f3c77e fix: authentication 2023-11-06 13:01:11 +11:00
7a705e3b81 feat: document authoring 2023-11-06 13:01:09 +11:00
0fca2e9f4e fix: improve typesafety 2023-11-06 13:01:08 +11:00
3c73f030ac feat: persist fields and recipients for document editing 2023-11-06 13:01:07 +11:00
5442e82ae7 clean up console.log() used for testing 2023-11-06 13:01:07 +11:00
6253c42ca1 feat: google auth without schema change 2023-11-06 13:01:07 +11:00
159bcade7b wip: refresh design 2023-11-06 13:01:06 +11:00