Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behaviour for credential types #2854

Closed
1 of 2 tasks
taylordowns2000 opened this issue Jan 23, 2025 · 5 comments · Fixed by #2866
Closed
1 of 2 tasks

Strange behaviour for credential types #2854

taylordowns2000 opened this issue Jan 23, 2025 · 5 comments · Fixed by #2866
Assignees
Labels
bug Newly identified bug

Comments

@taylordowns2000
Copy link
Member

On v2.10.12 (1.4.12) I'm seeing two strange things related to credentials:

  1. the hubtel credential type doesn't show up, despite a seemingly valid configuration schema existing here - this was generated directly by the pnpm generate <adaptor> command.
  2. there is a gmail credential type, despite gmail using Oauth. It asks the user to enter an access token manually, but access tokens are automatically generated via the Oauth flow.

I have reproduced this locally on main:

  • Yes
  • No

To Reproduce Steps to reproduce the behavior:

  1. Go to https://app.openfn.org/credentials
  2. Click on "Add new"
  3. Check out the "Gmail" type and the missing "Hubtel" type
@taylordowns2000 taylordowns2000 added the bug Newly identified bug label Jan 23, 2025
@github-project-automation github-project-automation bot moved this to New Issues in v2 Jan 23, 2025
@jackohilts
Copy link

Image

In case this is also relevant - the image for the Hubtel Adaptor (above) is also not showing on the canvas (below)

Image

@theroinaochieng theroinaochieng moved this from New Issues to Ready in v2 Jan 23, 2025
@elias-ba elias-ba self-assigned this Jan 23, 2025
@elias-ba elias-ba moved this from Ready to In progress in v2 Jan 23, 2025
@elias-ba
Copy link
Contributor

Regarding the Gmail credential, it’s expected that it renders oddly. This happens because we need to configure an OAuth Client for it; without one, the system doesn’t recognize it as a valid OAuth Credential.

Currently, the system parses its JSON Schema file to generate the form inputs. Since the JSON Schema includes an Access Token field, the system interprets this and renders an input for it. However, we don’t yet support generating OAuth credentials directly from the JSON Schema. While building that functionality is possible, for now, all OAuth credentials must be associated with an OAuth Client.

@taylordowns2000 Would it be possible to create a Gmail OAuth Client? It sounds like a Google OAuth Client with these scopes: https://developers.google.com/identity/protocols/oauth2/scopes?hl=fr#gmail

@elias-ba
Copy link
Contributor

elias-ba commented Jan 24, 2025

I just did these 3 guys and I could have the Hubtel icon nicely appear in my workflow and my credential types:

mix lightning.install_runtime
mix lightning.install_adaptor_icons
mix lightning.install_schemas

- Hubtel Adaptor Icon

Image

- Hubtel Credential Type

Image

- Hubtel Credential Form

Image

@elias-ba
Copy link
Contributor

cc @jackohilts @taylordowns2000 see my comments above !

@taylordowns2000
Copy link
Member Author

taylordowns2000 commented Jan 24, 2025 via email

@taylordowns2000 taylordowns2000 moved this from In progress to In review in v2 Jan 24, 2025
stuartc added a commit that referenced this issue Jan 27, 2025
* fix: remove 'Gmail' from list for #2854"
* update for Collections

---------

Co-authored-by: Stuart Corbishley <[email protected]>
@github-project-automation github-project-automation bot moved this from In review to Done in v2 Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Newly identified bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants