Redocly / developer-portal-starter

Starter template for the Redocly developer portal
https://redoc.ly
Other
64 stars 102 forks source link

Default logout functionality appends [object, object] to the end of the url causing 404 page on logout #206

Closed bjonesy closed 2 years ago

bjonesy commented 2 years ago

When using the logout function from @redocly/ui it always appends [object%20Object]/ to the end of the url. This causes a 404 page to always show. Screen Shot 2022-05-03 at 9 43 34 AM

Following the documentation here. Customized the Nav and added the UserMenu based off of this example provided. https://github.com/Redocly/developer-portal-starter/pull/27/files#diff-956569b7abd1175639b59c147c5cf8e3760eec4b8bdc467bda8f2ebde51aca9d

On version 1.1.0-beta.92

bjonesy commented 2 years ago

I was able to resolve this. For others, if you customize the NavBar component and use login you can pass a logout url as a param in the logout function. You can also opt out of customizing the NavBar and use configuration for login and logout. https://redocly.com/docs/developer-portal/configuration/siteconfig/login/#examples