title: How can i use get token using react+firebase?
body: <pre><code>export function* login(auth, action){
  try{
      const {signInWithEmailAndPassword} = auth
      const {email, password} = action.user
      const user = yield call([auth, signInWithEmailAndPassword], email, password)
      const {ra} = user.user
      yield auth.verifyIdToken(ra)
          .then(function(decodedToken) {
              let uid = decodedToken.uid
              console.log(uid)
          }).catch(function(error) {
              console.log('error no token')
          })
      /*
      axios.post('/api/token', { i really need to call a cloud function?
          ra
      }).then(data =&gt; data.data)
      */
      yield put(ActionCreator.signinSuccess(user.user))
  }catch({message}){
      yield put(ActionCreator.signinFailure("Dind't have possible do login"))
  }        
  }
  </code></pre>
  
  <p>My doubt is this: when I log in to the firebase, I get a token, which stays in the variable 'user.user.ra'. To be able to use this token in my requests to the firebase realtime database, do I need to send that token to a cloud function to do the validation, or can I use some method in my own react to do this? In the firebase site, you have the method <code>admin.auth().VerifyIdToken(idToken)</code> to do this validation, but I can not use it in my saga. How should I do?</p>