According to the latest documentation of Aws Amplify V6 ,to generate token we have to use onTokenReceived from aws-amplify/push-notification for implementing push-notifications on Mobile using react-native
const myTokenReceivedHandler = (token) => {
console.log("Push token received in Dashboard:", token);
};
const listener = onTokenReceived(myTokenReceivedHandler);
return () => listener.remove();
}, []);
But this never gets executed,and I donn receive any token . I am using Firebase-messaging/app package to get token and the using identifyUser from aws-amplify/push-notification to register token to endpoint.
I want to know if anyone else also faced the problem with token generation on aws-amplify?