Hi @david, thanks for your reply. What I want to achieve here is to create an API for Apple login that will be used by the mobile app to access the Discourse API.
For using the Discourse API to log in with email and password, it works fine using these two Discourse APIs:
{{discourse_host}}/session/csrf.json: This API returns a cookie and CSRF code, which will be used for login using the next API.{{discourse_host}}/session: This API returns a new cookie that can be used to access other Discourse APIs.
I expect it to be similar to Apple login in Discourse, where I make a request to the Discourse API to generate the _t cookie.


