# Is it possible?

**URL:** <https://meta.discourse.org/t/is-it-possible/234221>\
**Category:** SSO\
**Created:** [July 28, 2022, 3:08am UTC](https://meta.discourse.org/t/is-it-possible/234221 "2022-07-28T03:08:48Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Lai\_Chau\_Koi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lai_chau_koi/32/262307_2.png) [@Lai\_Chau\_Koi](https://meta.discourse.org/u/Lai_Chau_Koi)\
**Post date:** [July 28, 2022, 8:03am UTC](https://meta.discourse.org/t/is-it-possible/234221/9 "2022-07-28T08:03:50Z")

</div>

Thanks for your help.  
However, My boss wants it.  
Please check my perform.  
I tried to perform with Discourse API like this

1. call GET ‘/session/csrf’ and get csrf token and cookie
2. call POST ‘/session’ with Header:‘X-CSRF-Token’=‘csrf token’, ‘Cookie’ = ‘obtained cookie’, Data: login, password, timezone, second-factor-method,authenticity-token
3. call POST ‘/login’ with Header: ‘Cookie’=‘obtained cookie from /session’  
Data: username, password, redirect

All logs are same with Discourse Login workflow.  
But when I redirect to discourse forum, user didn’t log in.

How can I solve this issue? What wrong?

Thanks for your help again.

PS. My Server is Ubuntu Nginx Server.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible/234221)._
