I would really like to use a certified library for this but I haven’t found any that support it.
Our Angular app has a C# back end where we can store secrets. The front end is only involved with redirecting the user to the authorization server and getting back an authorization code which our back end exchanges for an access_token
. The front end does not need the token. The Token Mediating Backend Pattern is a lighter weight version of BFF (Backend for Frontend).