Very simple solution is there
if you write
https://localhost in Authorized JavaScript origins you will get Error 400: redirect_uri_mismatch
Just Write
http://localhost in Authorized JavaScript origins you will not get any Error