I'm building a Rails API with a proper front-end to go along with it (probably React). I'm currently implementing the API and haven't written a single line of front-end. I'm trying to implement OAuth with Facebook as explained in @a14m's answer for this post.
However the problem is that my API would require an authentication code
so that it can exchange it for an access token
with Facebook. As far as I understand, the code
is obtained via a login dialog on the front-end. Now I want to test whether or not my API is getting a valid access token
from Facebook in exchange for the code
. But to get the code I have to open a dialog on the "front-end" which I have not implemented yet.
Any way I could open the dialog for Facebook login and get the code
without writing the front-end? I probably think Postman would help but I don't know how. Also if there is a way to obtain the token without triggering the dialog would also get my job done. So I just want a way to access the code
without a front-end.