Plugin request method question #1764
-
Hi, I am trying to make request from "lowdefy-plugin-jwt" plugin. Once I pass
however in my other plugin with custom Action everything is working fine:
How to properly call request from authorize function? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @kemeris2000 The Auth.js (next-auth) provider plugins don't receive methods like The Provider only receives the properties defined in the What kind of request do you want to make? If it is an http/axios request you could use the Fetch api: When using the credentials provider, the the So to pass a username and password you would do: - id: login
type: Login
params:
providerId: jwt_provider
username:
_state: username
password:
_state: password More on the credentials provider: https://next-auth.js.org/providers/credentials |
Beta Was this translation helpful? Give feedback.
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 theLogin
action.So to pass a username and password you would do: