3

I am trying to create a form on Gitlab pages (only accessible to Members) and on submit I want to trigger a pipeline of another project which will use all the form values and use it as pipeline variables.

I used Hugo template to create the Gitlab Page project and ran pipeline which is successfully publishing the website.

I changed the template to accept inputs and submit to other project's pipeline URL.

I found a really good example here https://gitlab.com/guided-explorations/gitlab-api/custom-pipeline-form but OAuth implicit Grant flow is deprecated and not secure.

I looked at Gitlab doc for other option and come across https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-with-proof-key-for-code-exchange-pkce which requires an Application setup with redirect/callback URL.

I am not 100% sure what this callback or redirect URL would be. I tried my Gitlab pages URL and it failed with The redirect URI included is not valid.

Wonder if anyone has worked on a similar requirement. Any suggestions will be highly appreciated.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

0 Answers0