-
Notifications
You must be signed in to change notification settings - Fork 8
Fix minor issues in SDKs #13
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| THUNDERID_CLIENT_ID=your-client-id-here | ||
| THUNDERID_CLIENT_SECRET=your-client-secret-here | ||
| THUNDERID_BASE_URL=https://localhost:8090 | ||
| # DANGER: Disables ALL TLS verification. Only for local development with self-signed certs. NEVER use in production. | ||
| NODE_TLS_REJECT_UNAUTHORIZED=0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| NEXT_PUBLIC_THUNDERID_BASE_URL=https://localhost:8090 | ||
| NEXT_PUBLIC_THUNDERID_CLIENT_ID=your-client-id-here | ||
| NEXT_PUBLIC_THUNDERID_APPLICATION_ID=your-application-id-here | ||
| THUNDERID_CLIENT_SECRET=your-client-secret-here | ||
| THUNDERID_SECRET=generate-with-openssl-rand-base64-32 | ||
| # DANGER: Disables ALL TLS verification. Only for local development with self-signed certs. NEVER use in production. | ||
| NODE_TLS_REJECT_UNAUTHORIZED=0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| THUNDERID_CLIENT_ID=your-client-id-here | ||
| THUNDERID_CLIENT_SECRET=your-client-secret-here | ||
| THUNDERID_BASE_URL=https://localhost:8090 | ||
| # DANGER: Disables ALL TLS verification. Only for local development with self-signed certs. NEVER use in production. | ||
| NODE_TLS_REJECT_UNAUTHORIZED=0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { UserDropdown } from '@thunderid/react' | ||
|
|
||
| export default function Dashboard() { | ||
| return ( | ||
| <main> | ||
| <UserDropdown /> | ||
| </main> | ||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,9 @@ | ||
| import { SignedIn, SignedOut, SignInButton, SignOutButton, User } from '@thunderid/react' | ||
| import { SignInButton } from '@thunderid/react' | ||
|
|
||
| export default function Home() { | ||
| return ( | ||
| <main> | ||
| <SignedOut> | ||
| <h1>Welcome</h1> | ||
| <SignInButton /> | ||
| </SignedOut> | ||
| <SignedIn> | ||
| <User>{(user) => <h1>Hello, {user.given_name || user.username}.</h1>}</User> | ||
| <SignOutButton /> | ||
| </SignedIn> | ||
| <SignInButton>Sign In</SignInButton> | ||
| </main> | ||
| ) | ||
| } | ||
|
Comment on lines
+1
to
9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🌐 Web query:
💡 Result: In the Citations:
🏁 Script executed: git ls-files | rg '^(templates/react/vite-react-template|templates/react|.*react.*template).*'Repository: thunder-id/javascript-sdks Length of output: 656 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== file list ==\n'
git ls-files templates/react/vite-react-template/src templates/react/vite-react-template/README.md templates/react/vite-react-template/package.json
printf '\n== main.jsx ==\n'
cat -n templates/react/vite-react-template/src/main.jsx
printf '\n== App.jsx ==\n'
cat -n templates/react/vite-react-template/src/App.jsx
printf '\n== Home.jsx ==\n'
cat -n templates/react/vite-react-template/src/Home.jsx
printf '\n== Dashboard.jsx ==\n'
cat -n templates/react/vite-react-template/src/Dashboard.jsx
printf '\n== README.md (relevant lines) ==\n'
rg -n "dashboard|route|react-router|SignedIn|SignedOut|SignInButton|SignOutButton" templates/react/vite-react-template/README.mdRepository: thunder-id/javascript-sdks Length of output: 2305 Restore the signed-in Home state 🧰 Tools🪛 ESLint[error] 1-10: Missing WSO2 Apache 2.0 copyright header ( [error] 1-1: Unable to resolve path to module ' (import-x/no-unresolved) 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Add the standard Apache header.
This new file is missing the repository’s required copyright banner, so the lint step will keep failing until it is added.
🧰 Tools
🪛 ESLint
[error] 1-10: Missing WSO2 Apache 2.0 copyright header
(
@thunderid/copyright-header)[error] 1-1: Unable to resolve path to module '
@thunderid/react'.(import-x/no-unresolved)
🤖 Prompt for AI Agents
Source: Linters/SAST tools