Wiki

Articles tagged with "cookie", sorted by date (updated)X
Displaying 1-6 of 6 result(s).

Configuring different sessions for backend and frontend in Yii advanced app

Updated about a month ago by Kartik VHow-tos0 comments – viewed 1,654 times – ( +26 ) – version 2.0
After you have setup your Yii2 advanced application, you now have setup your user authentication for both frontend and backend. However, if you have first logged into frontend, and try to access backend from the same client machine, you see no login screen, but find yourself automatically logged in.

Checking for "expired" sessions/logins on the client side

Updated 3 months ago by Arno SHow-tos0 comments – viewed 11,801 times – ( +4 ) – version 1.1
Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

Cookie management in Yii

Updated about a year ago by resurtmHow-tos5 comments – viewed 81,512 times – ( +41 / -1 ) – version 1.1
Cookie management in Yii is easy, but may not be so obvious for the beginners to this framework, so I wrote this simple article to clear some doubts out.

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Updated 2 years ago by c@cbaTutorials10 comments – viewed 25,774 times – ( +15 ) – version 1.1
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this. We implement an event handler for the onBeginRequest event; as the name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.

Single sign on across multiple subdomains

Updated 3 years ago by ianarĂ©How-tos9 comments – viewed 27,252 times – ( +31 ) – version 1.1
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.