Skip to content

Plugin request method question #1764

Discussion options

You must be logged in to vote

Hi @kemeris2000

The Auth.js (next-auth) provider plugins don't receive methods like request as parameters.

The Provider only receives the properties defined in the lowdefy.yaml. This is done so that they are similar to other Auth.js examples.

What kind of request do you want to make? If it is an http/axios request you could use the Fetch api:
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch

When using the credentials provider, the the authorize function receives variables passed by the Login action.

So to pass a username and password you would do:

    - id: login
      type: Login
      params:
        providerId: jwt_provider
       username:
          _state: username

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kemeris2000
Comment options

Answer selected by kemeris2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants