Jump to content

CreateSsoToken Redirect


Recommended Posts

I have implemented the CreateSsoToken API with my custom OIDC addon for SSO. It works as expected when using a pre-defined destination. However, when using the sso:custom_redirect destination, my client is not redirected to the checkout page as it is defined below.

$results = localAPI( 'CreateSsoToken', array(
	'client_id' => $client->id,
	'destination' => 'sso:custom_redirect',
	'sso_redirect_path' => 'cart.php?a=checkout'
), 'Jon Erickson' );

 

Link to comment
Share on other sites

  • 5 months later...

Apparently the error is in the format of the WHMCS administrator's username.
WHMCS admin is optional for WHMCS 7.2 and later, you do not need to inform the admin, you can use only the boolean false, example:

$results = localAPI( 'CreateSsoToken', array(
	'client_id' => $client->id,
	'destination' => 'sso:custom_redirect',
	'sso_redirect_path' => 'cart.php?a=checkout'
), false );
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