Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
Store Data on Users Google Account

I have used This to create a login on my site, with the onSignIn function, signOut function, and auth2.isSignedIn.get() function (which checks if you are already signed in).

Now is there a way if which I can get a piece of data from the site, e.g. a special value from an input that the user has typed, and store it on the user (google user who logged in)'s google account, preferably as a key, like localStorage?

A minor start here:

document.getElementById("userText").addEventListener("change", function() {
    var data = document.getElementById("userText").value;
    
    googleAccount.userData = data; // Change this Line
});
<input type = "text" id = "userText">

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

That is not possible, it's just not within the goals and purposes of an(y) authentication provider.

Have you thought of:

  • How would Google keep "your" piece of data secure and separate from other sites that would try to do the same for that user?
  • How would Google deal with the possibly Gigabytes of data that it would have to store (per user, for multiple sites combined) within days after this feature would be introduced?

The way this is usually done is by creating a database / datastore, that you then maintain and make backups of (and possibly pay for) in which you store data for each user, using some User ID as a "key".

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda