Reputation: 49
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">
Upvotes: 2
Views: 879
Reputation: 24280
That is not possible, it's just not within the goals and purposes of an(y) authentication provider.
Have you thought of:
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".
Upvotes: 1