惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
罗磊的独立博客
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
博客园_首页
量子位
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
S
SegmentFault 最新的问题
雷峰网
雷峰网
小众软件
小众软件
博客园 - 聂微东
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
WordPress大学
WordPress大学
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog

Gary' Blog

Migrate pip to uv - Gary' Blog Terminal autocomplete (only macOS and Linux) How to expand the hard disk capacity of Debian/Ubuntu in ESXi Authentication FastAPI with Keycloak - Gary' Blog Careers and LinkedIn Jobs Page of Fortune 500 American Companies How to connect Windows desktop remotely using RDP and cloudflare ZeroTrust tunnel ESXi 8 issue solved: This PC can’t run Windows 11 How to download and license ESXi 8? Get clicked word using pure Javascript
Keycloak configuration problems and solutions
Gary · 2025-02-04 · via Gary' Blog

400 Bad Request when login

Please check your realm name, it should not include SPACE.

How to get client secret

You need to turn on Client authentication and Authorization at client Settings.

Then you can see and copy the Client secret from the credentials tab.

How to get Access token signature algorithm

You will get following error if didn’t set up Access token signature algorithm or set a wrong value:

jose.exceptions.JWKError: ('Could not deserialize key data. The data may be in an incorrect format, the provided password may be incorrect, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [<OpenSSLError(code=503841036, lib=60, reason=524556, reason_text=unsupported)>])

Go to Client -> Advanced -> Access token signature algorithm, select the one you setup at your code.

JWTClaimsError(‘Invalid audience’)

Wee need to add a token mapper (with type Audience) to the dedicated scope of the client.

Clients > Your client > Client scopes > your-client-dedicated Add mapper > by configuration > Audience.

Add a name of the mapper, select your client on the select box and enable Add to access token. Your client should now be in the "aud" field of the access token.

References