RoR Web app error when redirecting to /authorize

Hi there, I am attempting to redirect to the <DOMAIN>/authorize endpoint. I am sending query params of redirect_uri, response_type, client_id, and state. With state being a random uuid. How can I use that state to get around the csrf error? I am using Rails for this.