^ <@U7YRX6BA4>
# ktor
d
^ @brabo-hi
Didn’t test. But normally in a form authentication you use the from data to validate it instead. Why do you want to access the session there?
If you want to create a session from an authentication form, you can do the validation in the form.validate like that, and then do something like this: https://github.com/ktorio/ktor/commit/6b2cb44866efa1ef05e8efe2895682508e10965b#diff-b2953d451e94315f380d2ba5dfca359eR241 To generate a session from from the principal In the youkube sample there is another example of this: https://github.com/ktorio/ktor-samples/blob/6977894ddf53368cee8ae27ef11614a8906ae850/app/youkube/src/Login.kt#L14-L30
b
thanks, i changed it to the same as youkube
👍 1