meteor-accounts

logout a meteor user on window/tab close but not on page refresh.

余生颓废 提交于 2021-01-28 07:40:35
问题 I have used window.onbeforeunload to logout a meteor user on browser tab close. It works fine with tab close but my user gets log out on page refresh which I do not want. Is there any solution to this problem. I want user to not logout on page refresh. I am new in Meteor. Any help would be highly appreciated. The code I have used for this is window.onbeforeunload = function() { Meteor.logout(); } 回答1: I'm kinda new to meteor too and after many tries I found this solution : if (sessionStorage

How do I get the built in formatting for UserAccounts Meteor to work?

十年热恋 提交于 2020-01-16 19:53:23
问题 I have included the UserAccounts (Semantic UI) package with the meteor app. On inserting the routes and the {{> atForm}}, this is how my front page looks. Which is very different from the examples shown here: UserAccount Page Steps taken: Deleted the entire Css Deleted and reinstalled other packages like Unstyled or boostrap But nothing works. Formatting is still the one in the picture. Can someone please help or provide advice? Let me know which codes you need to review, I'll post them on

Meteor: Accounts.createUser() doesn't create user

好久不见. 提交于 2020-01-03 03:14:06
问题 i'm building an application where people Can't create their account by themselves but the first user created (me) can create users in a form in the application. It's why I setted in /lib/config/account.js: forbidClientAccountCreation: true, My problem is, I can't create users in my form when I'm logged .. (even if I set this option above with false. Here is my code: userAdd.js: Template.userAdd.events({ 'submit .new-user': function(event) { event.preventDefault(); var email = $('input[name=

Meteor accounts-password + accounts-entry and Password Confirmation

ぃ、小莉子 提交于 2020-01-02 12:24:31
问题 I don't see any options in the accounts-entry package, nor the accounts-password package, that allows for a password-confirmation field in the signup form in accounts-entry. Am I missing something? 回答1: No it dosnt have a verify password field on the package, you need to create by your own with simple JS if(password === validationPassword){ Meteor.call("createUsers",mail,password,profile); } This type of action can only be completed in the client side and not on the server side, because the

Why is the customized Meteor accounts verification email not display as HTML?

99封情书 提交于 2019-12-25 09:18:03
问题 Here's my code in imports/api/friends/methods.js : import {Meteor} from "meteor/meteor"; import {Accounts} from "meteor/accounts-base"; if (Meteor.isServer) { Accounts.emailTemplates.siteName = "...."; Accounts.emailTemplates.from = "example01 <example01@gmail.com>"; Accounts.emailTemplates.verifyEmail.from = function () { return "example01 <example01@gmail.com>"; }; Accounts.emailTemplates.verifyEmail.text = function(user, url) { return '<h1>Thank you for your registration.</h1><br/><a href=

Meteor Accounts.loginWithPassword “400 Match Failed” Error

岁酱吖の 提交于 2019-12-25 08:09:43
问题 I'm playing around with the Angular Meteor tutorial that uses Ionic to create a WhatsApp Clone. I changed the phone verification to a normal user setup using username/password. Accounts are created using Accounts.createUser(email,password,callback) When they logout and attempt to log back in, I have a form that an existing user can use to fill in their email and password. I cannot get the Meteor.loginWithPassword(email,password,callback) method to work for this scenario; it keeps saying that

Modifying user.profile using Accounts.onCreateUser for loginWithMeetup

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 13:41:08
问题 When a user creates an account using the the Meetup login package, I want to get a few more values such as the user's full name and URL to their profile picture then store them in user.profile. Currently, I'm checking if the service is "meetup", performing the following GET request and trying to store it in user.profile. if (service == "meetup") { var accessToken = user.services.meetup.accessToken; var request = Meteor.http.get('https://api.meetup.com/2/profiles',{ params : { access_token :

“Login Forbidden” when using Meteor's Accounts.validateLoginAttempt(func)

我是研究僧i 提交于 2019-12-24 00:35:23
问题 I have a basic Meteor method that I am trying to call whenever the user attempts to sign in. Accounts.validateLoginAttempt(function (options) { Meteor.call('method', true, function (error, result) { // do nothing }); }); However, whenever I try to sign in, I receive "Login Forbidden" as an error. The same happens upon sign up. I am guessing I need to be returning something for the function, but do not know what. Your help would be greatly appreciated! 回答1: From the docs http://docs.meteor.com

Meteor Social Login - Blank page on oauth2 login using Facebook or Google

纵饮孤独 提交于 2019-12-24 00:32:41
问题 I am working on a mobile app using Meteor and Facebook or Google login. On Android devices it works great. But on iOS devices I get a blank page after successful authentication.The user has to click on a "Done" button to close the page and get the app regain control. Meteor version 1.3.4.4 and latest accounts-facebook , accounts-google packages. This is the code I am using for login: //Oauth login with Facebook. this.loginFB = function() { Meteor.loginWithFacebook({ requestPermissions: [

Meteor 1.3+ Accounts Facebook Login for iOS not working

做~自己de王妃 提交于 2019-12-23 06:50:09
问题 I have been trying to find a solution (sadly for 3 months now) to login with Facebook using Meteors Accounts Facebook on iOS. I have tried just about everything a Google search will come up with, reached out on the Meteor forums and even opened up a Github issue. But this problem still escapes me. Everything works fine on desktop but as soon I as I test on mobile I get a Facebook error "Not Logged in. You are not logged in. Please login and try again" . I have found several others with this