Jump to content

Generating csrfKey From logged in user


Oren Arizoni

Recommended Posts

Posted

Hey guys,

I am using the code below to access the logged in user on my site (logged in via the forum)

require 'forum/init.php';
/* Initiate the session to verify who this user is */
\IPS\Session\Front::i();

/* Print the user's name */
$member = \IPS\Member::loggedIn();

Now, I would like to add a logout button on my site, that logs out the user. but I noticed that the log out url requires csrfKey value.

For example: http:/somedomain.com/forum/index.php?/logout/&csrfKey=85752a5694b832fa95c821b96c00d914

this is a user specific csrfKey. How can I generate this key using php?

thanks!

OK!

Founds the solution:

\IPS\Session::i()->csrfKey

sorry for the re-pose ;)

Posted

I am using a different programming language, what makes up the csrfKey?  How can I generate that (what variables together are combined) to make that

Or is there a way to do any type of api/http call that I can pass certain variables and it will return the proper csrfKey for that user?

I did ask this question a while back here, not sure if I really got the answer i needed

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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