Can now link google account

This commit is contained in:
Thaum Rystra
2020-05-16 14:07:22 +02:00
parent acb9dc342a
commit cd2727b61c
3 changed files with 28 additions and 2 deletions

View File

@@ -77,6 +77,10 @@ const userSchema = new SimpleSchema({
type: String,
regEx: SimpleSchema.RegEx.Id,
},
profile: {
type: Object,
blackbox: true,
},
});
Meteor.users.attachSchema(userSchema);

View File

@@ -9,9 +9,15 @@ Meteor.publish('user', function(){
apiKey: 1,
darkMode: 1,
subscribedLibraries: 1,
profile: 1,
'services.patreon.id': 1,
'services.patreon.entitledCents': 1,
'services.patreon.entitledCentsOverride': 1,
'services.google.id': 1,
'services.google.picture': 1,
'services.google.name': 1,
'services.google.email': 1,
'services.google.locale': 1,
}}),
Invites.find({
$or: [

View File

@@ -54,9 +54,20 @@
Tier: {{ tier.name }}
</v-list-tile-title>
</v-list-tile>
<v-list-tile v-if="!user.services.google">
<v-btn
color="primary"
@click="linkWithGoogle"
>
Link Google Account
</v-btn>
</v-list-tile>
<v-list-tile v-if="!user.services.patreon">
<v-btn @click="linkWithPatreon">
Link Patreon
<v-btn
color="primary"
@click="linkWithPatreon"
>
Link Patreon Account
</v-btn>
</v-list-tile>
</v-list>
@@ -196,6 +207,11 @@
data: {inviteId: invite._id},
});
},
linkWithGoogle(){
Meteor.linkWithGoogle(error => {
if (error) console.error(error);
});
},
linkWithPatreon,
},
}