Notifications
Clear all

login in as guest

13 Posts
3 Users
0 Reactions
4,971 Views
(@dr-d)
Posts: 2
New Member
Topic starter
 

how do I log in as guest I'm able to create a new guest but how do I log in as one I tried  Authenticate but I get error success false credentials are invalid and I'm sure I'm putting the correct credentials from             

    var user = new Combu.User ();

        user.CreateGuest ((bool success, string error) => {

PlayerPrefs.SetString ("UserId", Combu.CombuManager.localUser.id);
 PlayerPrefs.SetString ("SessionToken", Combu.CombuManager.localUser.sessionToken);

 

plz help asap

        var user = new Combu.User ();

        user.Authenticate (PlayerPrefs.GetString("UserId"), (bool success,string error) => {

            Debug.Log ("loginginasGuest - Success=" + success + " > Error="+error);

        });

 
Posted : 23/05/2017 6:35 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

If you're using Combu 2.x then you need to use User.AuthenticateSession, while from Combu 3.x the authentication of a previous session is no more supported and was replaced with a built-in auto-login system, click here for the documentation.

Basically it's storing the latest username and encrypted password after a successful Authenticate if the property rememberCredentials of CombuManager component was true.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 23/05/2017 8:32 pm
(@dr-d)
Posts: 2
New Member
Topic starter
 

can you add User.AuthenticateSession again to 3.0? there going to be so many guest accounts with auto login if players are not using there main account I want them to sign in to there same guest account again ty for your reply.

 
Posted : 24/05/2017 12:55 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

AuthenticateSession won't be added back because of the new workflow and auto-login feature, but I noticed that I forgot to implement the storing info for auto-login in the method CreateGuest so I'm going to fix that. You will have to use the auto-login feature, as said it will store the last successful credentials in PlayerPrefs as you were doing for when you will use User.AutoLogin()

I'll notify you here when the update will be available with this fix.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 24/05/2017 1:13 pm
 dr.d
(@drzfinestplaya21hotmail-com)
Posts: 10
Active Member
 

I hope you haven't forgotten

 
Posted : 26/05/2017 8:44 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

I've uploaded it right now, go to Purchase History and try it out please.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 26/05/2017 9:02 pm
 dr.d
(@drzfinestplaya21hotmail-com)
Posts: 10
Active Member
 

where is the invoice number? also please provide a way to change username

 
Posted : 26/05/2017 10:55 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

The invoice number is on your Asset Store invoice, it's called "Invoice No." on top right of the PDF.

To change username just set the property before calling Update.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 27/05/2017 2:04 am
 dr.d
(@drzfinestplaya21hotmail-com)
Posts: 10
Active Member
 

how do I change forum username is what I meant but nvm I figured it out 

 
Posted : 27/05/2017 2:17 am
 dr.d
(@drzfinestplaya21hotmail-com)
Posts: 10
Active Member
 

ok its working now but how do I create data into guest I used 

 

var userdata = Combu.CombuManager.localUser;

userdata.customData["coins"] = coins;

but it won't work for guest

 
Posted : 01/06/2017 9:34 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

After having created the guest account with CreateGuest then you should be able to add your keys to customData of localUser and finally call Update to send to the server. What's your code and issue?

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 01/06/2017 11:20 pm
 dr.d
(@drzfinestplaya21hotmail-com)
Posts: 10
Active Member
 

my apologies its working correctly ty for helping me and thank you for your fast replies will rate u 5 stars on unity

 
Posted : 01/06/2017 11:38 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Great, thank you! 🙂

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 02/06/2017 1:34 pm
Share: