[plugin] backendless plugins

Post your work in progress addons and get feedback

Post » Mon Oct 03, 2016 6:59 am

@rexrainbow
Hi Rex.
I'm using your Backendless plugins to dev my game.
everything seem fine, but i'm facing 2 problem that i cannot handle.
1- When i use FB logging from Authentication, it not redirect back after user authorized.(Backendless cloud work fine, backendless standalone not redirect back)
2- When 2nd user login to system, with the same user name, there is any solution to tell 1st user is logged out?
I was set this option in Backendless : When a secondary login occurs, logout and notify: First user.
But 1st user cannot receive this event.
I tried condition:is login, on logged out, already, it not work.

Hope you can help, thank again for a great plugins.
B
47
S
7
G
1
Posts: 37
Reputation: 2,599

Post » Tue Oct 04, 2016 2:49 pm

@mickeyboy
FB login
There are 2 kind of FB login
Method A. "Action:Login by facebook", it will pop-up a facebook login window (not redirection)
Method B. "Action:Login by facebook SDK".
1. login by other plugin ( for example, official FB plugin ),
2. then call "Action:Login by facebook SDK", it will use access token to login.


Multiple login
In dashboard, "User" tab -> "Login" -> "Enable Multiple Logins" and set property. (I have not tested them yet.)
If this solution does not work yet, there has another workaround, although it is a good solution.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Wed Oct 05, 2016 3:35 am

@rexrainbow

Hi.
Thank you for your answers.
FB Login.
I 'll try to use login with facebook SDK.

Multiple login :
I don't want multiple login, so i was disable Multiple logins in dashboard.
When user login again, the 1st session is logout(token no longer valid). But no way to detect this user is login or not.
I want to do like this : when user login with same account in other place, notify the 1st session and move back to login layout.

New problem :
When using Safari this error come up. Only if using Safari(iOS, MacOS)
http://prntscr.com/cpyl32
http://prntscr.com/cpykyf

Hope you can help.
Thank you.
B
47
S
7
G
1
Posts: 37
Reputation: 2,599

Post » Wed Oct 05, 2016 5:10 am

@mickeyboy

Please update rex_backendless_api plugin, new bug had been fixed. Thanks for this bug reporting.

I will try to find another solution of checking logged out by "Multiple login".
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Wed Oct 05, 2016 6:07 am

@rexrainbow

Thank you for your quick response and fix.
Login with FB SDK working fine.

About multiple login.
Condition: is login, is working, but when i try use "Invert" to check if use is not login, it not trigger.

Thanks again. :)
B
47
S
7
G
1
Posts: 37
Reputation: 2,599

Post » Wed Oct 05, 2016 7:21 am

Update

rex_backendless_authentication: add "Action:Test session", "Condition:On get valid session", "Condition:On get invalid session".

Call "Action:Test session" to test if current session is valid. "Condition:On get valid session" will be triggered when current session is valid, otherwise "Condition:On get invalid session" will be triggered.



@mickeyboy

I could not find solution of receiving logged-out notification.
I added "Action:Test session", "Condition:On get valid session", to help user tests if current session is valid. You might test session periodically (every 1 minute, for example).
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

Post » Thu Oct 06, 2016 4:14 am

Hi @rexrainbow.
Thank you for your update.
it helped me much.

Thanks.
B
47
S
7
G
1
Posts: 37
Reputation: 2,599

Post » Mon Oct 17, 2016 11:22 am

Hi @rexrainbow.

I was tried to condition: test session
But "On get invalid session" never trigger.
"On get valid session" always trigger event when session is invalid.

Sorry to bother you so much. But only you can help.

Thank you.
B
47
S
7
G
1
Posts: 37
Reputation: 2,599

Post » Mon Oct 17, 2016 2:13 pm

@mickeyboy

Test capx, run this capx with these steps
0. set "Enable Multiple Logins" to "OFF" and chooses "When a secondary login occurs, logout and notify:" to "Second user".
1. login, you will see it login success
2. open another tab, paste the url in step1 to open the same page, try login in this page, you will see it login failed. Error message will show at console.
failed- User is already logged in from another device/computer. The application is configured to disable multiple concurrent logins with the same user credentials.

And the session is still invalid.

It will not work if set "When a secondary login occurs, logout and notify:" to "First user". "On get invalid session" never trigger in this case indeed. I am sorry I could not help you in session valid testing.
B
108
S
26
G
258
Posts: 4,430
Reputation: 145,179

PreviousNext

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest