- Place the
bundled/sw.js
in a directory accessable from your front-end application - Initizlize Authul:
import {Authul} from 'authul'
const auth = new Authul({endpoint: "https://auth.example.com", clientId: "<your_client_id>", ...otherOptions })
await auth.init()
await auth.getTokens()
- Place call redirect once Authotization is completed.
In redirect.html
import {redirect} from 'authul'
redirect()