Jump to content

Single sign on custom redirect 8.1


Abernee

Recommended Posts

Since upgrading to 8.1 from 7.10 I'm having to update my web application to use WHMCSs  single sign on API to allow my users to navigate and sign in to the  WHMCS client area direct from my own website.   Previously  I was using the old autoAuth method with no issues.  In the new single sign on API call, setting the 'destination' parameter to 'clientarea:submit_ticket' or 'clientarea:tickets' works as expected and the user gets linked to the desired page.  

On 7.10 with the old autoAuth I could create a link direct to the WHMCS cart where the user would be logged in and the selected product added to the cart by adding 

"&goto=" & UrlEncode("cart.php?a=add&pid=2")" 

to the link.

Now with the single sign on I can't see how to do this.  I've tried setting the 'destination' parameter to 'sso:custom_redirect' and the 'sso_redirect_path' to 'cart.php?a=add&pid=2' but the provided link always goes to the WHMCS news page.  If anyone could help me get this working again that would be great as it is fairly important for my application.

Edited by Abernee
Link to comment
Share on other sites

  • 5 months later...

Hello 
I am facing the same issue. Would you please let me know what your mistake was for the parameter?
i am passing destination: 'sso:custom_redirect' and sso_redirect_path:'viewinvoice path'. it's going every time on a new page. As you said i also have followed document properly but not working

Link to comment
Share on other sites

  • 1 year later...

Hello,

$command = 'CreateSsoToken';
$postData = array(
    'client_id' => '8',
    'destination' => "sso:custom_redirect",
    'sso_redirect_path' => "clientarea.php?action=invoices"
);
$results = localAPI($command, $postData);

Relative path should be given in   'sso_redirect_path' when using   'destination' => "sso:custom_redirect", instead of full or any formatted path.

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated