Skip to Content
🎉 New release with new features and improvements! V0.0.6 Release →

JWT Authentication

For user-based authentication, use JWT tokens:

const bshEngine = new BshEngine({ host: 'https://your-instance.com', jwtToken: 'access-token', refreshToken: 'refresh-token' // Optional, enables auto-refresh });

The JWT token is sent as Authorization: Bearer <token>. Pair with a refresh token (refreshToken or refreshTokenFn) so the engine can renew expired access tokens and return meta.accessToken.