In the actions I only see the following in the event.connection object
/** Connection */
declare type Connection = {
/** The connection's unique identifier. */
id: string
/** The name of the connection used to authenticate the user (such as: `twitter` or `some-g-suite-domain`). */
name: string
/**
* The type of connection.
*
* For social connection `connectionStrategy === connection`.
* For enterprise connections, the strategy will be `waad` (Windows Azure AD), `ad` (Active Directory/LDAP), `auth0` (database connections), and so on.
*/
strategy: string
}
Is there a global client around where I can grab the connection metadata with the connection id?
In the mean time, I am gonna add https://github.com/auth0/node-auth0 and the needed credentials via action secrets to get the metadata, but i’d much prefer if the connection metadata was in the event, just like it is in the rules.
Actions already have the app and user metadata but is only missing the connection metadata for some reason.
So I added auth0 and it’s adding a brutal amount of latency because it has to auth and get a token and then call the API, so that’s 2 new requests in the auth chain
Pretty please, add connection metadata to the event
Thanks for trying out actions @fieldju! We’ll get event.connection.metadata added. It’s only missing due to an oversight on our end. Sorry about that!
Also, our hope is that in the future it should be pretty rare that you’ll need to use the Auth0 client in an action, but when you do, we’ll have better ways of providing it to you than relying on you to bootstrap it yourself. Stay tuned for that.
@chris.geihsler is that a next sprint type of thing or a next quarter type of thing?
I implemented my workflow 2x, one with hooks + rules and the other with actions.
I am stashing the actions away on a branch for now, but would like to switch over to them one this is implemented because I like the UX of dev’ing actions better.