Basics of Custom Authentication? Resources?

Hi, the documentation for Photon custom authentication seems solid and I think I could handle the client side of things, but I am a bit new to web development. Does anyone know any good resources or documentation to help me get the photon authentication database example on github running on my website? I am using Drupal for my website. Any help, links, or even a nudge in the right direction would be greatly appreciated.

Comments

  • Hey falonso, just missed this topic :)
    I think the mini-tutorial I did can help you:
    viewtopic.php?f=17&t=2697

    Check it out...
    Cheers
  • I guess you know this page:
    http://doc.exitgames.com/photon-cloud/C ... -reference

    I'll point a colleague to this topic, too. He might have some samples, too.
  • Thanks, team! I like it a lot! This is a great (and needed) feature that was easy to implement... turn-key auth for Google Play Game Services would be amazing though.
    What's the least annoying way I can beg for that?
  • Hi all,

    glad to here you like the feature :).

    Thanks xandeck for the php tutorial - would you mind sharing a sample project?
    We are planning to add samples like https://github.com/exitgames/photon.cus ... entication
    to github and allow for contributions.

    For those who are interested in a quick and easy way to setup solution (affordable cloud hosting) we've been testing this great service http://webscript.io "short scripts, written in Lua, that run on our(webscript.io) servers. They can respond to HTTP requests or run as cron jobs". Its really easy and effective to use.

    We are planning to integrate them more tightly as partner site.

    But in the mean time for those interest in trying it out here is a simple sample that works like our c# sample in github - to tryout 1)sign-up 2) setup the script 3) configure url for you app:

    [code2=lua]if (request.query.code ~= nil) then
    return tonumber(request.query.code)
    end

    local resultOK = {
    ResultCode = 1,
    Message = "OK"
    }

    local resultFailed = {
    ResultCode = 2,
    Message = "Failed"
    }

    local resultInvalidParams = {
    ResultCode = 3,
    Message = "Parameter invalid"
    }
    -- check required params are set
    if ((request.query.username == nil) or (request.query.username == '')
    or (request.query.token == nil) or (request.query.token == '') and
    (request.method ~= "POST"))
    then
    return
    json.stringify(resultInvalidParams)
    end

    if request.method == "POST" then
    --log("post-data:"..request.body)
    return
    json.stringify(resultOK)
    end

    -- URL?username=yes&token=yes -> 1
    -- URL?username=yes&token=no -> 2
    if request.query.username ~= 'yes' then
    resultFailed.Message = 'Failed: user not found'
    return
    json.stringify(resultFailed)
    end
    if request.query.token ~= 'yes' then
    resultFailed.Message = 'Failed: pw mismatch'
    return
    json.stringify(resultFailed)
    end
    -- we are OK
    return
    json.stringify(resultOK)[/code2]

    Note: you might wonder why POST is always returning ok - this is an upcomming new feature. (not released in the public cloud jet)
  • We are about to introduce also built-in/turn-key support for
    - facebook
    and
    - parse

    anybody interested in a beta access please send an email to [email protected].
  • For those interested in support for Steam - we need someone with an account we can work with.

    If interested please send us a shout at [email protected].
  • falonso wrote:
    Hi, the documentation for Photon custom authentication seems solid and I think I could handle the client side of things, but I am a bit new to web development. Does anyone know any good resources or documentation to help me get the photon authentication database example on github running on my website? I am using Drupal for my website. Any help, links, or even a nudge in the right direction would be greatly appreciated.

    As to your question - I don't know anything about drupal - just had a quick look and it seems to me it is based on php or at leaset is extendable with it. You have two options
    - either you setup a a page that works like explained by xandeck.
    or
    - you find out if they have a web-api you can hook into and setup a script (in webscript.io for instance) to bridge the call between photon and drupal.