How to setup Oauth2 in V11

I have followed the link below but it didn’t work in v11.
https://frappe.io/docs/user/en/guides/integration/how_to_setup_oauth

Has anyone experienced in setup Oauth2 in V11?

I posted this mini-walkthrough just a few days ago:

1 Like

Thanks for your help. But i got other error, which my session always expired.

Here’s response header in Postman.
image

Current date 5 Nov, but expired since 4 Nov.

Hmm…that’s very strange. I don’t know much about how the backend works, so I can’t add much. Is your ERPNext system clock accurate otherwise?

I found what caused the error
After change Client Authentication Basic Auth header to client credential in body, everything works fine.
image

1 Like

Oh cool. Is that setting in Frappe or Postman? I don’t think I’ve seen it before.

OAuth2 Setting in Postman.

Client Credentials grant is not implemented in frappe

Available grants are

Implicit Grant
Authorization Code grant
Resource owner password credentials grant

https://tools.ietf.org/html/rfc6749#section-1.3

2 Likes

I’m not quite sure what the different between Basic Auth header and client credential in body in Postman setting. But only client credential in body works for me. I haven’t tried in real app.