Skip to content

How to get the token returned by a login? #376

Answered by prescottprue
mcampbell asked this question in Q&A
Discussion options

You must be logged in to vote

cy.login uses a custom task which is added by cypress-firebase called createCustomToken which returns the token after calling firebase-admin internally - you can call like so:

cy.task('createCustomToken', 'SomeUid')
 .then((token) => {
   // call whatever is needed here
  })

Let me know if I'm misunderstanding

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by prescottprue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants