N
N
Nikita Kotenko2018-06-13 08:19:07
JavaScript
Nikita Kotenko, 2018-06-13 08:19:07

How to implement authorization check on server side in Nuxt+Firebase?

I want to host the entire application on Firebase (hosting, functions, firestore). In store (vuex) I store user data. But when the page is reloaded, the store is reset and you have to wait on the client until the data arrives and the pages that require authorization become available.
The goal is for the client to receive a store already filled with user data.
From the Internet they write that on the server (Firebase Functions) you need to take a token from the request header (Auth ...: Bearer), but a simple page reload does not contain this token in the request.
How? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question