The OAuth2 protocol is a standard that allows a client application to have limited access to the resources of another…