IO-1551 Polling mode for unsupported browsers.
This commit is contained in:
@@ -38,8 +38,14 @@ export const updateCurrentPassword = async (password) => {
|
||||
|
||||
return updatePassword(currentUser, password);
|
||||
};
|
||||
let messaging;
|
||||
try {
|
||||
messaging = getMessaging();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
export const messaging = getMessaging();
|
||||
export { messaging };
|
||||
|
||||
export const requestForToken = () => {
|
||||
return getToken(messaging, {
|
||||
@@ -48,6 +54,7 @@ export const requestForToken = () => {
|
||||
.then((currentToken) => {
|
||||
if (currentToken) {
|
||||
console.log("current token for client: ", currentToken);
|
||||
window.sessionStorage.setItem("fcmtoken", currentToken);
|
||||
// Perform any other necessary action with the token
|
||||
} else {
|
||||
// Show permission request UI
|
||||
|
||||
Reference in New Issue
Block a user