Subsonic registration engine

A little external engine to register users in Subsonic

Moderator: moderators

Re: Subsonic registration engine

Postby SparkyRih » Fri Sep 21, 2012 4:25 pm

I really would like to look into the FB connectivity, but I'm so busy with other projects lately.... If I have some time left I will dive into it, but I can't promise anything in a short period of time...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby willieb » Fri Sep 21, 2012 6:35 pm

SparkyRih wrote:I really would like to look into the FB connectivity, but I'm so busy with other projects lately.... If I have some time left I will dive into it, but I can't promise anything in a short period of time...


That would be totally awesome and a sweet feature for your subsonic mod! Thanks for the consideration.

Hey maybe those of us that use and love your registration engine can give a donation to help you find a little extra time? ;-) If so you can count me in. Anyone else?
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Subsonic registration engine

Postby gurutech » Fri Sep 21, 2012 7:04 pm

Been thinking about this, and I *think* all that needs to be done is to figure out how to "read" the data returned from Facebook and convert that into the "CreateUser" command with proper parameters to create the user ID in Subsonic and/or the MySQL database.

I could do it if I knew how Facebook returned the data. That's where I'm stuck. If anyone has done Facebook apps before, I'm sure you can help with this!

There seems to be two components - one being the "registration", where I would need to create a new user in Subsonic based on the Facebook data, and the other is a "login" component, which would just compare the FB data with what's already in the Subsonic system.
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Subsonic registration engine

Postby SparkyRih » Sun Sep 23, 2012 1:05 pm

It's not that hard to get the data back from facebook...

I've modified the comment system of http://www.padfoneclub.com to allow people to comment with their facebook account so that they don't have to sign up if they just want to make one comment...

I guess you all would want to have a "stand alone" facebook login feature?

Edit: I've hadsome time today...
If I create a facebook authentication mod, everyone still has to create their own Facebook developers account/app, and it still requires a separate PHP based server...

I can however also create an API on my own server to allow people to register their Subsonic domain name, and rely on that... That way, you only have to replace a modified login.jsp and add your account to my API, and no facebook dev stuff or separate server would be required...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby gurutech » Sun Sep 23, 2012 5:19 pm

I've created my own FB appID already, and have the login button on my page, but it doesn't do anything yet (just refreshes the screen), because I can't figure out how to get the data back from FB.

I have also modified one of your login.jsp files to point to the FB registration page instead of the one you developed, and that will come up, pre-fill the person's name, email address, and captcha code, and ask for a password/confirm password. But after that, it's the same problem as the login - can't figure out how to get the data back from FB.
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Subsonic registration engine

Postby Excessive » Mon Sep 24, 2012 1:43 am

Well, after reading a bit of the FB requests, I/we have an issue which is that SS will not accept a user name with more than one word. I've had this problem a couple of times with users registering user names with more than one word. It registers in the database, but not in SS, so I had to go into the database and delete the user names with more than one word because it will not let you re-register with the same email. So I'm asking Sparky if he can fix/add a warning message for people trying to register user names with more than one word and deny registration so that it won't register in the database because then the (same) email cannot be used. This will be a problem with FB names too.
Excessive
 
Posts: 33
Joined: Wed Apr 04, 2012 10:19 am

Re: Subsonic registration engine

Postby willieb » Mon Sep 24, 2012 1:55 am

Just to add, I have a Wordpress site that has a Facebook login plugin and when you use the Facebook login it automatically creates a username of your Facebook First_Last name for the username. It creates the username in the Wordpress db and authenticates the password with your fb login. But it adds an underscore in the username so there's no spaces.
willieb
 
Posts: 54
Joined: Fri Jul 27, 2012 3:03 pm

Re: Subsonic registration engine

Postby SparkyRih » Mon Sep 24, 2012 8:28 am

You just have to rewrite the username to add that _ or a . or whatever...
But you also have to think of the fact that you need to create a random password (a has which combines different values that you get back from fb) to avoid hacking...

But what do you guys want, a "do-it-yourself" mod, or an easy to use API...

And thanks for the tip about the multi-word username, I will add a warning...

Edit: I've added the check for spaces (Verison 2.11)... If you came from version 2.10 you only have to replace the register.php...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby Excessive » Mon Sep 24, 2012 9:52 am

OK, so I downloaded the fix and edited out the Schattorie.nl stuff, but when I tested it with the space it worked good with the warning, though if I try to register a one word (proper) user name from there onwards I get this on the next page:

Fatal error: Call to undefined function open_https_url() in C:\wamp\www\gbuser\register.php on line 64

Using version 200_4.6 with 211_4.6 register.php.
Excessive
 
Posts: 33
Joined: Wed Apr 04, 2012 10:19 am

Re: Subsonic registration engine

Postby SparkyRih » Mon Sep 24, 2012 11:03 am

Excessive wrote:OK, so I downloaded the fix and edited out the Schattorie.nl stuff, but when I tested it with the space it worked good with the warning, though if I try to register a one word (proper) user name from there onwards I get this on the next page:

Fatal error: Call to undefined function open_https_url() in C:\wamp\www\gbuser\register.php on line 64

Using version 200_4.6 with 211_4.6 register.php.


From which versionn did you upgrade?
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby Excessive » Mon Sep 24, 2012 11:05 am

I'm using version 200-46 with 211-46 register.php.
Excessive
 
Posts: 33
Joined: Wed Apr 04, 2012 10:19 am

Re: Subsonic registration engine

Postby SparkyRih » Mon Sep 24, 2012 11:33 am

Excessive wrote:I'm using version 200-46 with 211-46 register.php.


That's the problem, it's missing functions that I've added in the versions in between 2.00 and 2.11:

Version 2.00-X.X
-Added support for regestering users in multihost image hoster.
-Added feature to approve users before they can use their credentials (optional, turned off by default).
Version 2.02-X.X
-Update login script.
Version 2.05-X.X
-Added support for https protocol (default setting: http).
Version 2.10-X.X
-Fixed bugs in https support.
-Cleaned up code.
Version 2.11-X.X
-Added a check to check for space in a username (which is not properly supported by Subsonic).


I would recommend updating all the files including the config.php since it contains new settings...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby Excessive » Mon Sep 24, 2012 2:14 pm

OK, all fixed, everything working! Thanks again.
PS Can I pm you Sparky, I want to ask something in private?!
Excessive
 
Posts: 33
Joined: Wed Apr 04, 2012 10:19 am

Re: Subsonic registration engine

Postby SparkyRih » Mon Sep 24, 2012 4:18 pm

Excessive wrote:OK, all fixed, everything working! Thanks again.
PS Can I pm you Sparky, I want to ask something in private?!


Sure...
VMWare ESXi 5.5 > Ubuntu 16.04 > Subsonic 6.0 (Modded with PHP based registration feature)

Image
User avatar
SparkyRih
 
Posts: 216
Joined: Wed May 11, 2011 1:52 pm
Location: The Netherlands

Re: Subsonic registration engine

Postby gurutech » Tue Sep 25, 2012 1:32 am

Once the facebook registration part is done, how would you configure the "facebook login" button to just log you in, instead of having to type your username and password?

I am trying to create a field where the user can choose their own username (I have added a column in the subsonicusers database), but because I don't want to pass that field over to FB during registration, I have to use a JSON format, but it's not working. if I have that field in there, it tells me there's an error.

I want to have [name, username (no_submit=true), email, password] fields. I figured out I had to "md5" the password to get it to encrypt, as it would show up as plaintext in my database if I didn't. I can get the information from FB to my database, but like mentioned above, the entry isn't created in SS because of the space thing in the name (which I want to separate anyway, and only have the person's name inside the database, not SS)

Can someone post a sample "registration" form in JSON format (please remove app ID and app secret before posting, or just PM me with the info). I must be missing something.

Can someone tell me why this isn't working as a JSON formatted script?
Code: Select all
<iframe src="https://www.facebook.com/plugins/registration?
             client_id=(my ID)&
             redirect_uri=(my website)/registerfb.php&
             fields=
             [
            {'name':'name'},
            {'name':'Username', 'description':'Choose A Username', 'type':'text', 'no_submit':'true'}
            {'name':'email'},
            {'name':'password'},
            {'name':'captcha'}
           ]"

        scrolling="auto"
        frameborder="yes"
        style="border:none"
        allowTransparency="true"
        width="500"
        height="500">
</iframe>
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

PreviousNext

Return to Subsonic Registration Engine

Who is online

Users browsing this forum: No registered users and 3 guests