OAuth for Server-Side applications (oauth2 secure backend flow)
toc secure flow original without PKCE secure flow with PKCE detailed flow examples (with PKCE) secure flow original without PKCE state param prevents CSRF 1) [front-channel] browser -> my-app GET [my-app.com/login](http://my-app.com/login) **- generate random value: state** < redirect to [auth-server.com/auth](http://auth-server.com/auth) (response_type, client_id, redirect_uri, scope, **state**) 2) [front-channel] browser -> auth-server GET [auth-server.com/auth](http://auth-server.com/auth) (response_type=code, client_id, redirect_uri, scope, **state**) < redirect to [my-app.com/redirect](http://my-app.com/redirect) (code, state) 3) [front-channel] browser -> my-app/redirect GET [my-app.com/redirect](http://my-app.com/redirect) (code, **state**) **- verifies state** 4) [back-channel] my-app -> auth-server POST [auth-server....