livebook/assets/js/hooks/app_auth.js
Jonatan Kłosko 4334e8a58e
Add access control to apps (#1715)
Co-authored-by: José Valim <jose.valim@dashbit.co>
2023-02-18 01:16:42 +01:00

15 lines
309 B
JavaScript

import { storeAppAuthToken } from "../lib/app";
/**
* A hook for the app auth page.
*/
const AppAuth = {
mounted() {
this.handleEvent("persist_app_auth", ({ slug, token }) => {
storeAppAuthToken(slug, token);
this.pushEvent("app_auth_persisted");
});
},
};
export default AppAuth;