I cannot set more than 1 cookie from controller

i am modifiying discourse and for that inside session_controller.db file I am doing this

cookies[:sso_payload] = payload || request.query_string
cookies[:sso_destination_url] = data[:return_sso_url]

However it does not set the sso_destination_url cookie. if i remove sso_payload cookie, in that case sso_destination_url will be set. But both of them together does not work.

Please help i am new to ruby i searched online for help but couldn’t find anything

is there some type of limit set for cookies?