0

I've the below GitHub workflow where I need to run python code to get the token but after the steps are ran I'm getting error "ModuleNotFoundError: No module named 'authlib'" I have installed the required dependency. Works fine when I run locally please can someone help me

- name: Get Token
        run: |
          python -m pip install --upgrade pip
          pip install requests-oauthlib
          python -c "from authlib.integrations.requests_client import OAuth2Session;"
          if __name__ == '__main__':
           from authlib.integrations.requests_client import OAuth2Session

          token_endpoint = "https://example.com"

          client_id = "********"
          client_secret = "******"

          session = OAuth2Session(client_id, client_secret)
          session.fetch_token(token_endpoint)
          access_token = session.token["access_token"]

          print(access_token)
2

1 Answer 1

2

Please install Authlib package. https://pypi.org/project/Authlib/

pip install Authlib
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks it worked like a charm!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.