Jump to content

Changes to SESSION data for user authorization in WHMCS v8


Recommended Posts

Hello, community.

in whmcs v8 this logic for user / client authorization doesn't work

$ _SESSION ['uid'] = $ entry-> id;
$ _SESSION ['upw'] = \ WHMCS \ Authentication \ Client :: generateClientLoginHash ($ entry-> id, '', $ entry-> password, $ entry-> email);

and I check the SESSION array after login as owner from admin section and find new parameter "login_auth_tk", in older whmcs versions this parameter does not exist

[login_auth_tk] => {
"id": uid,
"email": user_email,
"password":?, (should be the database password (tblusers-> password) or something else?)
"userip": userip,
"timestamp": time (),
"hash": \ WHMCS \ Authentication \ Client :: generateClientLoginHash ($ entry-> id, '', $ entry-> password, $ entry-> email)
}

I was unable to authorize my clients after a successful reply from a social network.
Maybe someone knows what needs to be done, what to transfer / put into the session to authorize the user in the system and redirect the user to the clientarea page?

thanks for the help
 

Link to comment
Share on other sites

  • 10 months later...
  • WHMCS Support Manager

Hi there,

The best option depends upon exactly what you want to achieve:

If you need to check the logged in state, then these Methods are available: https://developers.whmcs.com/advanced/authentication/

If you have an app or service that needs to interact with WHMCS on behalf of your users, you should use OAuth: https://developers.whmcs.com/oauth/introduction/

Finally if you want a trusted application or third party to authenticate users into a WHMCS installation automatically, use Single Sign-On:  https://docs.whmcs.com/WHMCS_Single_Sign-On_Developer_Guide

 

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.

×
×
  • 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