OpenFn / OpenFn/lightning

Trying to save Credential without authorizing with Oauth Client crashes page

Open
#3,423 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Sentry Issue: LIGHTNING-117

FunctionClauseError: no function clause matching in Lightning.Credentials.build_oauth_create_multi/2
  File "lib/lightning/credentials.ex", line 196, in Lightning.Credentials.build_oauth_create_multi/2
  File "lib/lightning/credentials.ex", line 180, in Lightning.Credentials.create_credential/1
  File "lib/lightning_web/live/credential_live/generic_oauth_component.ex", line 512, in LightningWeb.CredentialLive.GenericOauthComponent.save_credential/3
  File "lib/phoenix_live_view/channel.ex", line 742, in anonymous fn/4 in Phoenix.LiveView.Channel.inner_component_handle_event/4
  File "/app/deps/telemetry/src/telemetry.erl", line 324, in :telemetry.span/3
...
(3 additional frame(s) were not displayed)

To create:

  1. Visit credentials page
  2. Click to create a new credential
  3. Pick an Oauth client, you can pick Gmail
  4. Click save (do not click to signin with ...)

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

Reproduce the listed credentials-page steps, then read lib/lightning/credentials.ex around create_credential/1 and build_oauth_create_multi/2, followed by save_credential/3 in lib/lightning_web/live/credential_live/generic_oauth_component.ex. Done means saving an OAuth credential without first signing in no longer raises the reported FunctionClauseError.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
authentication, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.