JavaScript is required to use Bungie.net

#api

originally posted in:BungieNetPlatform
Edited by lowlines: 5/10/2015 3:41:34 AM
5

Authentication with PSN, Xbox & Facebook

[edit 10.05.15] Removed Facebook login code (no longer supported by Bungie.net). Updated Xbox Auth flow. [edit 11.03.15] Added "Stay signed in" flags for Xbox and Facebook logins. Should hopefully allow you to stay in for a longer period of time. [edit 09.03.15] While messing around with my brother's account, I realised my function didn't take into account if someone used an unregistered account to sign-in. I've updated it to account for this and I've also added more comments to make it more clear what's going on (mainly for Xbox sign-ins...). [original post] While in the process of putting together a pastebin of my code to try and debug what I was doing wrong, I actually managed to get PSN sign-in working (I can't say exactly what it was that was wrong though...), and while I was at it I went and figured out Facebook and Xbox sign-ins too. The latter (Xbox) is just plain ugly because they've rigged their sign-in form to "Require Javascript", but if anyone has a cleaner solution more in-line with how PSN and Facebook are done, please let me know. Here's a straight forward PHP function you can use to enable logging in with all 3 methods, resulting in either success or fail. If it wasn't for @abl's [url=https://www.bungie.net/en/Clan/Post/39966/106896643/0/0]post[/url], I was pretty content with the idea that this wasn't possible (not for all 3 anyway, especially Xbox *scoffs*). If people have suggestions on how to make this better, please let me know. [url]http://pastebin.com/pQTH7WR7[/url]
English
#api

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

View Entire Topic
  • Edited by emrikol87: 4/23/2015 8:51:51 PM
    Thanks for posting this. PSN works fine but I can't seem to get the xbox login working. After a successful auth, the resulting html is something like this: [quote]Object moved to here.[/quote] Where "here" is linked to /en/User/SignIn?id=Xuid. It looks like its trying to get back to bungie's login page. Any suggestions? I've double checked that user/pass are valid.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    3 Replies
    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon