Library issue detected.
When I scale the nodejs application to use more than two instances, it gives an error,
Error { [CSRF Alert: Possible CSRF attack, state parameters do not match.] name: 'CSRF Alert' }
Since the "states" parameter in auth.js uses memory, this will create a problem for scaling the application.
Scenario
'/ oauth / linkedin' goes to App-0 (creates a state parameter βxxxxβ + in memory) '/ oauth / linkedin / callback βgoes to App-1 (here it will check whether the received state isβ xxxx "+ check whether in memory)
Recorded problem here
Using a sticky session in nginx to solve this problem.
source share