Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Make the most minimal changes necessary to implement any request.
- Prefer Svelte idioms and best practices.
- Maintain organized imports and code style in line with the surrounding context or any changes.
- Use https://www.conventionalcommits.org/en/v1.0.0/ style commit messages.
27 changes: 27 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI/CD

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint
4 changes: 0 additions & 4 deletions src/components/LogoutButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
export let logout_url = getContext(OIDC_CONTEXT_POST_LOGOUT_REDIRECT_URI)
export let classes = ''
export let styles = ''

const changeColor = (event) => {
styles = 'background-color: ' + event.target.value
}
</script>

<button class="btn {classes}" style="{styles}" on:click|preventDefault='{() => logout(oidcPromise, logout_url) }'><slot></slot></button>
3 changes: 1 addition & 2 deletions src/components/OidcContext.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@
export async function logout(oidcPromise, logout_url = null) {
const oidc = await oidcPromise;
const returnTo = logout_url || window.location.href;
oidc.signoutRedirect({ returnTo });
try {
const response = await oidc.signoutRedirect({ returnTo });
await oidc.signoutRedirect({ returnTo });
} catch (err) {
if (err.message !== 'no end session endpoint') throw err;
// this is most likely auth0, so let's try their logout endpoint.
Expand Down