def get_oauth_user_info(self, provider, resp):
        """
            Since there are different OAuth API's with different ways to
            retrieve user info
        """
        # for GITHUB
        if provider == "github" or provider == "githublocal":
            me = self.appbuilder.sm.oauth_remotes[provider].get("user")
            log.debug("User info from Github: {0}".format(me.data))
            return {"username": "github_" + me.data.get("login")}
        # for twitter
        if provider == "twitter":
            me = self.appbuilder.sm.oauth_remotes[provider].get("account/settings.json")
            log.debug("User info from Twitter: {0}".format(me.data))
            return {"username": "twitter_" + me.data.get("screen_name", "")}
        # for linkedin
        if provider == "linkedin":
            me = self.appbuilder.sm.oauth_remotes[provider].get(
                "people/~:(id,email-address,first-name,last-name)?format=json"
            )
            log.debug("User info from Linkedin: {0}".format(me.data))
            return {
                "username": "linkedin_" + me.data.get("id", ""),
                "email": me.data.get("email-address", ""),
                "first_name": me.data.get("firstName", ""),
                "last_name": me.data.get("lastName", ""),
            }
        # for Google
        if provider == "google":
            me = self.appbuilder.sm.oauth_remotes[provider].get("userinfo")
            log.debug("User info from Google: {0}".format(me.data))
            return {
                "username": "google_" + me.data.get("id", ""),
                "first_name": me.data.get("given_name", ""),
                "last_name": me.data.get("family_name", ""),
                "email": me.data.get("email", ""),
            }
        # for Azure AD Tenant. Azure OAuth response contains
        # JWT token which has user info.
        # JWT token needs to be base64 decoded.
        # https://docs.microsoft.com/en-us/azure/active-directory/develop/
        # active-directory-protocols-oauth-code
        if provider == "azure":
            log.debug("Azure response received : {0}".format(resp))
            id_token = resp["id_token"]
            log.debug(str(id_token))
            me = self._azure_jwt_token_parse(id_token)
            log.debug("Parse JWT token : {0}".format(me))
            return {
                "name": me["name"],
                "email": me["upn"],
                "first_name": me["given_name"],
                "last_name": me["family_name"],
                "id": me["oid"],
                "username": me["oid"],
            }
        else:
            return {}
Since there are different OAuth API's with different ways to
            retrieve user info