Services
Auth Server
Backstack offers an auth server that can be used for user authentication.
A no-code option for the authentication process.
Usage
Create a link from your site and include your app ID in the query.
https://auth.backstack.com?app_id=your-app-id
Once authenticated, the user is redirected to your configured callback page where you can request the authenticated JWT to initiate the session.
// callback.js
// Get the JWT id from the incoming Backstack auth server request.
const jwtId = request.headers.get('jwt_id')
// Get the actual JWT from the Backstack auth server.
const result = await fetch(`https://api.backstack.com/auth-server/fetch-jwt`, {
headers: {
'x-fetch-jwt': jwtId,
}
}
)
// Store the JWT for future API requests from your app codebase.
cookies.set('jwt', result.data.jwt)
Theming
A theming system is currently in development that will allow you to complement your existing website.