[plugin] firebase

Post your completed addons to share with the community

Post » Sat Jul 09, 2016 8:42 pm

@rexrainbow I added the Action:Logging out as you said but there is no change~ hmmm
B
12
S
3
Posts: 211
Reputation: 1,477

Post » Sun Jul 10, 2016 1:18 am

@Fireche

I dig into old document of firebase -
"Once a user authenticates to your app, Firebase manages their session, ensuring that the user is remembered across browser or application restarts. "

And in my testing of login in one browser with two tabs, they will share the same login status -- login or logging out at the same time.
Single-login plugin could not work perfect in this case. "Action:Logging out" under kicking condition will log out these 2 tabs. ~ hmmm

I will try to survey more detail about login configuration.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Sun Jul 10, 2016 8:43 am

Update

rex_firebase_authentication:
Add "Condition:On login by other app", "Condition:On logged out by other app".
They will be triggered while login by other tab already, or logged out by other tab. ( login status will be shared in all tabs )


@Fireche
These signals might help you to do some remedy if player try to login in multiple tabs.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Sun Jul 10, 2016 9:52 am

@rexrainbow

thank you. It somehwat works now, even tho it's still a bit buggy sometimes. The main problem is definitly that the login status is shared over all tabs.
B
12
S
3
Posts: 211
Reputation: 1,477

Post » Sun Jul 10, 2016 10:15 am

Update

rex_firebase_authentication:
Add Expression:PhotoURL to get photo URL from login provider, 3.x only. It could be used to load photo image into sprite ( action: load image from URL ) - sample capx
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Sun Jul 10, 2016 8:29 pm

Hi,

in an answer to my last post, "https://www.scirra.com/forum/how-do-i-gt-browser-game-lt_t178985" , I was told about FireBase.

Is Firebase a good choice to solve my problem and can I host it by myself?

Thank you!
B
5
S
1
G
1
Posts: 15
Reputation: 851

Post » Mon Jul 11, 2016 1:33 am

@m1ch43l

Firebase is a cloud data storage hosted by google, i.e. user could NOT have his own private firebase server because that the source code does not release.
Moreover, "all actions should be continued while the user is offline" means that it needs a server code with tick in 5 minute intervals. But firebase does not have cloud code, it could not tick every 5 minute. A workaround solution is to create another capx (project) to run the ticking logic.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Mon Jul 11, 2016 2:17 am

@Fireche

From this thread -
"Session durations are infinite now by design", the workaround is logged out while page load (on start of layout).
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Wed Jul 13, 2016 6:59 pm

@rexrainbow

Hi, rex.

Why command

Code: Select all
Timer.LastRemainInterval

returns me not remained time, but elapsed like this?

Code: Select all
Timer.LastElapsedTime

and

Code: Select all
Timer.LastTimeoutInterval

returns "NaN"?
B
29
S
8
G
2
Posts: 193
Reputation: 3,179

Post » Wed Jul 13, 2016 11:26 pm

Update

rex_firebase_timer: fix bug in expression:LastTimeoutInterval, LastRemainInterval, LastElapsedTime. ( sample capx )


@norman74
Try this new updating, thanks for your reply.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests