diff --git a/.changeset/auto-resolve-sso-icons.md b/.changeset/auto-resolve-sso-icons.md deleted file mode 100644 index dad92b2..0000000 --- a/.changeset/auto-resolve-sso-icons.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@onkernel/managed-auth-react": minor ---- - -Auto-resolve SSO provider icons via the Simple Icons CDN. `getSSOProviderInfo` now slugifies any provider key and renders its brand icon from `https://cdn.simpleicons.org/`, with a circular letter-avatar fallback when the icon fails to load. Removes the hardcoded `GoogleMark` / `GitHubMark` / `GitLabMark` / `MicrosoftMark` / `FacebookMark` / `AppleMark` SVGs in favor of the generic resolver, so new providers render out of the box without library changes. Non-brand keys (`passkey`, `sso`, `saml`) keep their built-in icons. diff --git a/.changeset/fix-strict-mode-double-exchange.md b/.changeset/fix-strict-mode-double-exchange.md deleted file mode 100644 index 0472c9a..0000000 --- a/.changeset/fix-strict-mode-double-exchange.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@onkernel/managed-auth-react": patch ---- - -Guard the bootstrap effect in `useManagedAuthSession` against React 18+ Strict Mode's mount → cleanup → mount double-invocation. Without the guard, the second mount re-fires `exchangeHandoffCode` with a now-consumed handoff code and the component lands in the error state ("Failed to start session") even when auth would have worked. Tracked per `(sessionId, handoffCode)` so a genuine prop change still triggers a fresh exchange. diff --git a/.changeset/wrap-button-overflow.md b/.changeset/wrap-button-overflow.md deleted file mode 100644 index 93d165f..0000000 --- a/.changeset/wrap-button-overflow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@onkernel/managed-auth-react": patch ---- - -Wrap button and option text when content overflows. `.kma-button` previously used `white-space: nowrap` and a fixed `height`, so long MFA / SSO / sign-in option labels clipped past the card on narrower viewports. Switched to `min-height` plus `overflow-wrap: anywhere` so labels wrap and the row grows to fit, and added `padding` + `min-width: 0` on `.kma-sso-button` so its label can shrink. diff --git a/packages/managed-auth-react/CHANGELOG.md b/packages/managed-auth-react/CHANGELOG.md new file mode 100644 index 0000000..59b70bc --- /dev/null +++ b/packages/managed-auth-react/CHANGELOG.md @@ -0,0 +1,13 @@ +# @onkernel/managed-auth-react + +## 0.3.0 + +### Minor Changes + +- [#13](https://github.com/kernel/managed-auth-react/pull/13) [`fc77370`](https://github.com/kernel/managed-auth-react/commit/fc773706772e29932ed971c3d3fbeab6833c4bb8) Thanks [@masnwilliams](https://github.com/masnwilliams)! - Auto-resolve SSO provider icons via the Simple Icons CDN. `getSSOProviderInfo` now slugifies any provider key and renders its brand icon from `https://cdn.simpleicons.org/`, with a circular letter-avatar fallback when the icon fails to load. Removes the hardcoded `GoogleMark` / `GitHubMark` / `GitLabMark` / `MicrosoftMark` / `FacebookMark` / `AppleMark` SVGs in favor of the generic resolver, so new providers render out of the box without library changes. Non-brand keys (`passkey`, `sso`, `saml`) keep their built-in icons. + +### Patch Changes + +- [#10](https://github.com/kernel/managed-auth-react/pull/10) [`74f27bc`](https://github.com/kernel/managed-auth-react/commit/74f27bcd366fda00c42b1cba3cd2a42ff9d5e217) Thanks [@Tom-Achache](https://github.com/Tom-Achache)! - Guard the bootstrap effect in `useManagedAuthSession` against React 18+ Strict Mode's mount → cleanup → mount double-invocation. Without the guard, the second mount re-fires `exchangeHandoffCode` with a now-consumed handoff code and the component lands in the error state ("Failed to start session") even when auth would have worked. Tracked per `(sessionId, handoffCode)` so a genuine prop change still triggers a fresh exchange. + +- [#13](https://github.com/kernel/managed-auth-react/pull/13) [`fc77370`](https://github.com/kernel/managed-auth-react/commit/fc773706772e29932ed971c3d3fbeab6833c4bb8) Thanks [@masnwilliams](https://github.com/masnwilliams)! - Wrap button and option text when content overflows. `.kma-button` previously used `white-space: nowrap` and a fixed `height`, so long MFA / SSO / sign-in option labels clipped past the card on narrower viewports. Switched to `min-height` plus `overflow-wrap: anywhere` so labels wrap and the row grows to fit, and added `padding` + `min-width: 0` on `.kma-sso-button` so its label can shrink. diff --git a/packages/managed-auth-react/LICENSE b/packages/managed-auth-react/LICENSE new file mode 100644 index 0000000..efb3588 --- /dev/null +++ b/packages/managed-auth-react/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Kernel Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/managed-auth-react/package.json b/packages/managed-auth-react/package.json index 34a4d09..a507f1f 100644 --- a/packages/managed-auth-react/package.json +++ b/packages/managed-auth-react/package.json @@ -1,6 +1,6 @@ { "name": "@onkernel/managed-auth-react", - "version": "0.2.0", + "version": "0.3.0", "description": "React component library for Kernel managed auth — one-component drop-in with a Clerk-style appearance API", "license": "MIT", "author": "Kernel Technologies, Inc.", @@ -13,9 +13,17 @@ "bugs": { "url": "https://github.com/kernel/managed-auth-react/issues" }, - "keywords": ["kernel", "auth", "react", "managed-auth", "authentication"], + "keywords": [ + "kernel", + "auth", + "react", + "managed-auth", + "authentication" + ], "type": "module", - "sideEffects": ["**/*.css"], + "sideEffects": [ + "**/*.css" + ], "main": "./dist/index.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", @@ -28,7 +36,11 @@ "./styles.css": "./dist/styles.css", "./package.json": "./package.json" }, - "files": ["dist", "README.md", "LICENSE"], + "files": [ + "dist", + "README.md", + "LICENSE" + ], "scripts": { "build": "tsup", "dev": "tsup --watch",