TypeError: provider.addScope is not a function in `createAuthProvider`
See original GitHub issueI am trying to trigger a login action with the following code:
export function onTwitterLogin () {
return (dispatch, getState, getFirebase) => {
getFirebase().login({
provider: 'twitter'
})
}
}
And I get the following error:
Uncaught (in promise) TypeError: provider.addScope is not a function
at createAuthProvider ...
This is the stack trace:
createAuthProvider @ auth.js:37
getLoginMethodAndParams @ auth.js:77
login @ auth.js:225
login @ compose.js:147
(anonymous function) @ auth.js:7
Looks like the addScope
function doesn’t exist for the TwitterAuthProvider
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
TypeError: this.addScope is not a function while trying to ...
As it shows in the example of GoogleAuthProvider , you need to initialize auth provider with a new instance. And I think you...
Read more >GoogleAuthProvider | Firebase JavaScript API reference
addScope('profile'); provider.addScope('email'); firebase.auth().signInWithPopup(provider).then(function(result) { // This gives you a Google Access Token.
Read more >TypeError: firebase.auth is not a function - YouTube
In this video, we're going to be discussing the TypeError : firebase.auth is not a function error. This error is often encountered when ......
Read more >Signing in users with Google | Identity Platform ...
Go to the Identity Providers page in the Google Cloud console. · Click Add A Provider. · Select Google from the list. ·...
Read more >Authentication
import { OAuthProvider } from "firebase/auth"; const provider = new ... addScope('user_birthday'); // Assuming the current user is an Apple user linking a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed within
v1.1.3
release. I also added a unit test to cover Twitter login as well as any other providers that don’t haveaddScope
.Thanks @prescottprue