OpenFn / OpenFn/lightning

Users are asked for apiVersion when no such field is expected in the adaptor

Open
#2,137 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

My small beef 🤏 🐄 with the current Generic OAuth2 implementation is that it asks users to provide an apiVersion whenever they create an OAuth2 credential.

As it turns out, many of our adaptors look for this apiVersion key in state.configuration and use it to... do stuff. But many don't. Why are we asking users to enter an apiVersion for every single type of OAuth2 credential if this data will never be used for anything? That feels quite misleading.

Thoughts on solutions:

  • I don't think we can, in good conscience, explain to users that when they fill out the apiVersion field on their standard Google Sheets credential it will do… absolutely nothing!
  • Maybe we change the GoogleSheets adaptor so it actually does something with that key? (I.e., maybe we change every adaptor that uses OAuth2 so that it respects this apiVersion key?
  • When initially speccing the Generic Oauth2 implementation, I thought that when someone creates an OAuth2 client (aka "Credential Type") they would specify the mandatory_scopes, optional_scopes, and additional_fields. Since this OAuth2 client is essentially a "credential form generation" I felt it would be sensible to specify what extra fields you want to appear on that credential form. - https://github.com/OpenFn/lightning/issues/2034

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Generic OAuth2 implementation and trace how credential forms handle apiVersion, additional_fields, mandatory_scopes, and optional_scopes. Compare that behavior with the GoogleSheets adaptor and the adaptors that read state.configuration.apiVersion; the issue needs a decided approach and defined completion criteria before implementation can begin.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.