Creating users without email

19 views
Skip to first unread message

DSR roma

unread,
Feb 3, 2016, 12:32:16 PM2/3/16
to Coronium IO
Hello!

I'm just testing Coronium on a AWS EC2 instance, to check if it fits the needs of my apps.

I need to login "anonymous" users, I'll ask then their email later, not at first use. So I thought to create them on the first time with myemail[+randomientifier]@gmail.com, but I think Coronium is not admiting "+" appends on gmail addresses, because when trying to log in with mye...@gmail.com it works fine, but with and other user with email myem...@gmail.com I can't login.

I get

xxx/mod_coronium.lua:124: Session token required. Log in.
stack traceback:
[C]: ?
[C]: in function 'assert'
xxx/mod_coronium.lua:124: in function 'getMe'

Using myem...@gmail.com I receive the email validation too with no problem.

I've verified not having any trouble updating user email (without using "+2"), and then login with the new one. Except that is not asking for validation of the new email.

Does anyone have some other idea to do anonymous login?
Thank you!

develephant

unread,
Feb 3, 2016, 9:16:53 PM2/3/16
to Coronium IO
Hi,

I'd recommend storing the "pending" users in a separate collection with an identifier of your choosing. Then when you ask for the email the first time, grab the info and create the actual user with cloud code.


Hope that helps.

Cheers. 

DSR roma

unread,
Feb 4, 2016, 4:31:10 AM2/4/16
to Coronium IO
Hi,

I tried to create the users using an identifier of my choose ("user123456") as email. It seems to work fine by now (I toogled off email confirmation).

For some of my apps this may be a good solution because I will never ask users their emails (I didn't need). 
For the apps that ask for email later, I'll try your approach. Thank you!

But you know well your code... do you think is any risk putting something that is not an email on the email field?

Regards

develephant

unread,
Feb 4, 2016, 12:39:37 PM2/4/16
to Coronium IO
Hi,

That should be fine as long as you don't expect to use any of the email features, like confirmation or password recovery.

Cheers.
Reply all
Reply to author
Forward
0 new messages