OpenFn / OpenFn/lightning

envs and oauth

Open
#4,004 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs technical design sandboxes and sync
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Right now, oauth credentials don't really support envs - the concept of envs doesn't play well with outh. Our generic oauth implementation require a unique set of client, credential and provider.

Right now we only allow one oauth "env" per credential - we don't support multiple.

This itself is a problem. When I run my sandbox, it won't have an oauth credential in the env, and you can't add a new env. You have to manually set a new credential, which isn't great

But also I think different providers have different needs?

For gmail tokens, I probably want to use the same account to access different things (a different sheet, a different drive folder). So I need one auth signin/account, and I need some means to switch resource in my workflow (how do I do this? I almost want to add more data, like the sheet id, to the credential - now part of my credential is shared across envs, and part is split)

For Salesforce, I probably want one oauth token form my production salesforce database, and one for my sandbox SF database. Is that two credentials? That feels more like two envs - I have two oauth sign ins associated with one credential.

It's tricky.

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

No files, tests, or entry points are named. Start by clarifying the intended relationship between environments, OAuth credentials, providers, and resources; the issue is ready only when that behavior and its acceptance criteria are agreed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.