Skip to content

Added support for consumer login#38

Merged
VarunSriram99 merged 2 commits into
mainfrom
37-add-support-for-consumer-login
May 5, 2026
Merged

Added support for consumer login#38
VarunSriram99 merged 2 commits into
mainfrom
37-add-support-for-consumer-login

Conversation

@VarunSriram99
Copy link
Copy Markdown
Contributor

Description

Checklist

  • I have made corresponding changes to the documentation.
  • I have added the necessary label (js or js with
    patch/minor/major - If publish is required).

js _t
minor _t

@neetogit-bot
Copy link
Copy Markdown

neetogit-bot Bot commented May 5, 2026

@VarunSriram99 Label js is not approved and will not be applied.

For a detailed list of all allowed labels please refer to approved labels list.
If you want to add a new label to this list, please create an issue in neeto-engineering-web and get it approved by Neeraj/Suman/Kirti.

@neetogit-bot neetogit-bot Bot added the minor label May 5, 2026
Copy link
Copy Markdown

@neeto-bugwatch neeto-bugwatch Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 NeetoBugWatch Review

I've analyzed your pull request and found some potential improvements that might be worth considering. Please review the specific line comments below for helpful suggestions.

💡 To trigger a re-review of this PR, add a comment with neeto-bugwatch-run on its own line (not inside a code block or blockquote).

Warning

Verdict: Needs review — 3 comments found, including major issues

Click to copy prompt for AI agent
Verdict: review_required

The following are code review comments from an AI reviewer that only has access
to the PR diff, not the full codebase. Treat every comment as a hypothesis,
not a fact. For each comment:

1. Investigate the verification questions against the full codebase first.
2. Go beyond the provided questions. Use your full codebase access to ask your
   own questions, check related code paths, and consider edge cases that the
   reviewer could not have seen from the diff alone.
3. Only implement the suggested fix if your investigation confirms the issue is real.
4. If the issue is not real, skip it entirely. Do not implement speculative fixes.

Prioritize by severity (critical > major > minor > trivial) and confidence score.
Only attend to comments with confidence below 0.5 if your investigation proves them valid.

[
  {
    "file_path": "js/src/index.ts",
    "line_number": 76,
    "comment": "Using `encodeURI()` before passing the value to `URLSearchParams` (via `getLoginUri`) will lead to double-encoding of any characters modified by `encodeURI` (e.g., spaces become `%20` then `%2520`). `URLSearchParams` automatically and safely applies URI encoding to values when generating the query string.",
    "confidence": 0.95,
    "severity": "major",
    "suggested_fix": "Remove `encodeURI` and pass `redirectUri` verbatim (i.e. `? redirectUri`).",
    "verification_questions": [
      "Are there any consumer redirect URIs containing spaces, brackets, or other characters modified by `encodeURI` that might fail due to double-encoding?",
      "Does the receiving authentication server explicitly expect `redirect_uri` to be double-encoded?"
    ]
  },
  {
    "file_path": "js/src/index.ts",
    "line_number": 2,
    "comment": "Since `Scope` is defined in a `.d.ts` file, importing it without the `type` keyword may cause bundlers or TypeScript (depending on `isolatedModules` settings) to emit a runtime require for `./types.js`. Because no JS file is generated for `.d.ts` files, this could lead to a runtime module not found error.",
    "confidence": 0.85,
    "severity": "minor",
    "suggested_fix": "Use a type-only import: `import type { Scope } from \"./types.js\";` or rename `types.d.ts` to `types.ts`.",
    "verification_questions": [
      "Does the build configuration enforce or safely handle type-only imports without the `type` keyword?",
      "Is a `./types.js` file actually generated in the compiled output?"
    ]
  },
  {
    "file_path": "js/src/index.ts",
    "line_number": 34,
    "comment": "The README indicates that all consumers live under the `app` workspace. However, if a developer omits the `workspace` option for a consumer, it falls back to the `NEETO_JWT_WORKSPACE` environment variable. This could easily lead to misconfigured URLs (e.g., `https://tenant.neetoauth.com/consumers/...` instead of `app.neetoauth.com`).",
    "confidence": 0.8,
    "severity": "minor",
    "suggested_fix": "Consider defaulting `workspace` to `'app'` when `scope === 'consumer'`, or throwing an error if `workspace !== 'app'` under the consumer scope to fail fast.",
    "verification_questions": [
      "Are there valid scenarios where a consumer scope uses a workspace other than 'app'?",
      "Would enforcing or defaulting the workspace to 'app' for consumers prevent common configuration errors?"
    ]
  }
]

Comment thread js/src/index.ts Outdated
Comment thread js/src/index.ts Outdated
Comment thread js/src/index.ts
@VarunSriram99 VarunSriram99 added frontend Deals with JS(React or JS configs etc) code majorly javascript Pull requests that update javascript code labels May 5, 2026
@VarunSriram99 VarunSriram99 merged commit 2cd038c into main May 5, 2026
1 check passed
@VarunSriram99 VarunSriram99 deleted the 37-add-support-for-consumer-login branch May 5, 2026 14:34
@neerajsingh0101
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Deals with JS(React or JS configs etc) code majorly javascript Pull requests that update javascript code minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for consumer login

2 participants