Repository navigation
Conversation
Add wrangler.toml, ESLint config, .dev.vars.example, and a minimal itty-router entry point. Wire up itty-router and tweetnacl as runtime deps; wrangler and eslint as devDeps. Closes #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
worker/wrangler.tomlwithname,main,compatibility_date, and[vars]forSPA_URL,GH_RUNNER_OWNER, andGH_RUNNER_REPOworker/.dev.vars.exampledocumenting required secrets for local developmentworker/src/index.js— minimal itty-router entry point with aGET /health route returning{ status: 'ok' }worker/.eslintrc.cjswitheslint:recommendedand ES module source typeitty-routerandtweetnaclas runtime deps;wranglerandeslintas devDeps inworker/package.jsonfrontend/src/services/gitlab.jswith GitLab PKCE OAuth flow helpers (startGitlabLogin,exchangeGitlabCode)Closes #5
Closes #7
Test plan
npm installcompletes without errorsnpm -w worker run build(wrangler deploy --dry-run) succeedsnpm -w worker run lintpasses with no errorsstartGitlabLogin('gitlab.com', clientId)and verify redirect URL contains correctcode_challenge,code_challenge_method=S256,response_type=code,scope=read_api, andredirect_urisessionStoragekeysgitlab_verifierandgitlab_hostare set before redirect?code=..., callexchangeGitlabCode(code)and confirm it POSTs tohttps://gitlab.com/oauth/tokenwith the correct body fieldssessionStoragekeys are removed afterexchangeGitlabCodeis called