mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
request push permission on all login paths
This commit is contained in:
parent
76461b7c29
commit
17eb18ce6a
@ -86,20 +86,26 @@ export function useAppContext() {
|
||||
const access = await setLogin(username, server, password, getApplicatioName(), getVersion(), getDeviceId(), state.deviceToken, notifications)
|
||||
await store.actions.setSession({ ...access, server});
|
||||
await setSession({ ...access, server });
|
||||
if (access.pushSupported) {
|
||||
messaging().requestPermission().then(status => {})
|
||||
}
|
||||
},
|
||||
access: async (server, token) => {
|
||||
const access = await setAccountAccess(server, token, getApplicationName(), getVersion(), getDeviceId(), state.deviceToken, notifications);
|
||||
await store.actions.setSession({ ...access, server});
|
||||
await setSession({ ...access, server });
|
||||
if (access.pushSupported) {
|
||||
messaging().requestPermission().then(status => {})
|
||||
}
|
||||
},
|
||||
login: async (username, password) => {
|
||||
const acc = username.split('@');
|
||||
const access = await setLogin(acc[0], acc[1], password, getApplicationName(), getVersion(), getDeviceId(), state.deviceToken, notifications)
|
||||
await store.actions.setSession({ ...access, server: acc[1]});
|
||||
await setSession({ ...access, server: acc[1] });
|
||||
if (access.pushSupported) {
|
||||
messaging().requestPermission().then(status => {})
|
||||
}
|
||||
await store.actions.setSession({ ...access, server: acc[1]});
|
||||
await setSession({ ...access, server: acc[1] });
|
||||
},
|
||||
logout: async () => {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user