Open whoacowboy opened 1 year ago
Describe the bug I am unable to log in using Twitter, but the same configuration allows me to log in with Facebook, Google, Discord, Twitch and others.
I get the error message "There is no request token for this page."
const options = { providers: { twitter: { url: process.env.TWITTER_URL, clientId: process.env.TWITTER_ID, redirectUri: process.env.TWITTER_REDIRECT_URI, }, }, } const Oauth = new UniversalSocialauth(axios, options) app.config.globalProperties.$Oauth = Oauth app.provide('$Oauth', Oauth)
import { inject } from 'vue' import { useStore } from 'vuex' import { Github, Facebook, Google, Twitter } from 'universal-social-auth' const Oauth = inject('$Oauth') const store = useStore() function useAuthProvider(provider, proData) { const pro = proData const ProData = pro || Providers[provider] Oauth.authenticate(provider, ProData).then((response) => { if (response.code) { responseData.value.code = response.code responseData.value.provider = provider store.dispatch('auth/socialLogin', { provider, response }) } }).catch((err) => {}) }
@click="useAuthProvider('twitter', Twitter)"
Describe the bug I am unable to log in using Twitter, but the same configuration allows me to log in with Facebook, Google, Discord, Twitch and others.
I get the error message "There is no request token for this page."
config
component
call