How to OAuth
Popup window method
window.addEventListener('message', async function(event) {
console.log(event)
// Check for the user data in the message
if (event.data?.type === 'well-oauth-token' && event.data?.token) {
// verify and store the token in a secure way
const jwtToken = event.data?.token;
// Close the popup window
if (popup) {
popup.close();
}
}
});Redirect method
Fetch with token
Name
Value
Name
Type
Description
Telegram mini app oauth
Last updated