v0.0.55
Summary
This release introduces Passkeys as a new, built-in authentication method, alongside important updates to the JavaScript SDK.
Developers can now let users sign up and sign in without passwords, using device-native authenticators like Face ID, Touch ID, or browser password managers.
In addition, we've cleaned up and simplified the SDK's authentication APIs for more consistency and predictability.
🚀 How to Use Passkeys
After upgrading your Satellite, update your app to the current version of @junobuild/core
.
To register a new user with a passkey, call signUp
with the webauthn
option:
import { signUp } from '@junobuild/core';
await signUp({
webauthn: {}
});
For returning users, call signIn
with the same option to use their existing passkey:
import { signIn } from '@junobuild/core';
await signIn({
webauthn: {}
});
Unlike existing third-party providers, Passkeys require a distinct sign-up and sign-in flow. This is by design: the WebAuthn standard prevents apps from knowing in advance whether a user already has a passkey, for privacy reasons.
⚠️ JS API Breaking Changes
Mandatory provider in signIn
Previously, calling signIn()
without arguments defaulted to Internet Identity. This default has been removed. You must now explicitly specify the provider for each call:
// Internet Identity
await signIn({ internet_identity: {} });
// NFID
await signIn({ nfid: {} });
// Passkeys
await signIn({ webauthn: {} });
Page reload on signOut
By default, signOut
now reloads the page (window.location.reload
) after a successful logout. This ensures your app restarts from a clean state.
If you wish to opt out, you can disable the reload while still clearing the internal authentication state:
await signOut({ windowReload: false });
👋 JS API Deprecations
The authSubscribe
method has been replaced by onAuthStateChange
for consistency with industry naming conventions. The original function is deprecated but will continue to work for the time being.
import { onAuthStateChange } from '@junobuild/core';
const unsubscribe = onAuthStateChange((user) => {
console.log('User:', user);
});
unsubscribe();
📚 Learn More
Check out the updated documentation for details on:
Overview
Module | Version | Breaking changes |
---|---|---|
Satellite | v0.1.3 | ️ ️ |
Sputnik | v0.1.4 | ️ |
Crates | Version | Breaking changes |
---|---|---|
junobuild-cdn | v0.2.3 | |
junobuild-collections | v0.2.3 | ️ |
junobuild-satellite | v0.2.5 | |
junobuild-shared | v0.2.3 | |
junobuild-storage | v0.2.3 | ️ |
junobuild-utils | v0.1.3 | ️ |
Library | Version | Breaking changes |
---|---|---|
@junobuild/admin | v2.1.1 | |
@junobuild/cdn | v1.2.2 | |
@junobuild/cli-tools | v0.6.6 | ️ |
@junobuild/config | v2.1.0 | |
@junobuild/core | v2.0.0 | ⚠️ |
@junobuild/core-standalone | v2.0.0 | ⚠️ |
@junobuild/did-tools | v0.2.5 | |
@junobuild/errors | v0.1.3 | |
@junobuild/ic-client | v3.0.0 | 🆕 |
@junobuild/storage | v1.2.1 |
CLI | Version | Breaking changes |
---|---|---|
@junobuild/cli | v0.8.5 |
Docker | Version | Breaking changes |
---|---|---|
@junobuild/skylab | v0.3.10 | |
@junobuild/satellite | v0.3.10 | |
@junobuild/console | v0.3.10 |
GitHub Action | Version | Breaking changes |
---|---|---|
junobuild/juno-action | v0.4.13 |
Changes
Here is a list of changes included in this release:
Console (Backend)
No changes released in this version.
Console (Frontend)
The Console UI/UX has been improved as follows:
Features
- Added support for displaying the WebAuthn provider type and the authenticator (aaguid) used to create a user's passkey.
- Introduced a static list of known authenticators (aaguid) with a scheduled monthly job to keep it updated.
- Changed default filters in Analytics to show the last 2 weeks (instead of 1 month).
- Removed link to third-party providers.
- Updated list of subnets.
Fix
- Added a workaround for supporting an Orbiter version that was skipped.
- Ensured the authentication configuration is loaded when directly accessing the "Setup" tab.
Style
- Increased the size of square buttons.
- Fixed misaligned content in the upgrade modal information box.
Chore
- Bumped Juno libraries to latest versions.
- Dropped
autoprefixer
andsvelte-preprocess
in favor of the unified@sveltejs/vite-plugin-svelte
.
Satellite
The Satellite has been updated as follows:
Features
- Added support for authentication with WebAuthn:
- Created new collections
#user-webauthn
and#user-webauthn-index
on upgrade.- Collection
#user-webauthn
has read permission set to public (to allow reading public keys during user sign-in). Write is restricted. - Collection
#user-webauthn-index
is reserved for administrators.
- Collection
- Extended
UserData
to support the new provider typewebauthn
. - Extended
UserData
with a newProviderData
enum that includes the passkeyaaguid
, if available. - Implemented various schema checks to ensure data validity when creating users with passkeys.
- Automatically create an index entry in
#user-webauthn-index
when a new WebAuthn user is created. - On user deletion, related WebAuthn data is automatically cleaned up if necessary.
- Created new collections
- Continued migration to
ic_cdk@0.18.0
:- Made init arguments explicit.
- Migrated
ManualReply
with a custom implementation. - Added another custom implementation to continue using
id()
.
Mission Control
No changes released in this version.
Orbiter
No changes released in this version.
Observatory
No changes released in this version.
Sputnik
Sputnik inherits the improvements of the Satellite.
Serverless Functions
If you are using Serverless Functions, you can upgrade the following crates accordingly:
[dependencies]
junobuild-satellite = "0.2.4"
junobuild-utils = "0.1.3"