1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Single Sign-On through XenForo

Discussion in 'XenForo Development Discussions' started by B1K3R, Jul 15, 2013.

  1. B1K3R

    B1K3R New Member

    Hello all :)

    I am developing a 3rd party web application for racedepartment.com with C#.Net and I'm investigating if I can do a single sign-on through XenForo.

    In a nut shell, what I will try to do is the following:

    1. user logs into Xenforo forum
    2. there will be a link in xenforo for the new web application
    3. when user clicks on link, I would like to grab the xenforo username, check if he/she is authenticated and then pass the username to the new application. If not authenticated, then new web app will still load, but no user will be signed in.

    Is this possible please? And if so, how can I do it?

  2. B1K3R

    B1K3R New Member

    Ok.....let me make it simpler...

    Is it possible that I have a link in Xenforo forum with the username as parameter?



    Where VariableOne would contain the username from Xenforo forum.

  3. James

    James Well-Known Member

    Not by default, but you may be able to modify the login controller to pass the username as a parameter.
    B1K3R likes this.
  4. B1K3R

    B1K3R New Member

    Thanks James.
  5. xfrocks

    xfrocks Well-Known Member

    You can edit the template and add a link to your external site, in the link you can use something like {$visitor.username} to include the logged in user's name. However, that sounds like a security nightmare...

    /shameless plug: or you can use OAuth to authenticate user from your external site by installing the [bd] API add-on. There are popular ASP.NET libraries that support OAuth I believe.
    B1K3R likes this.
  6. B1K3R

    B1K3R New Member

    Cheers mate :)

Share This Page