Update OAuth identity provider to return user ID
Updates the OAuthUserIdentityProvider to return the user's Biome ID
instead of the OAuth subject identifier. The subject identifier will
only be used internally in OAuth implementations; everywhere else, the
user will be referred to by their Biome ID.
@@ -64,7 +64,7 @@ impl IdentityProvider for OAuthUserIdentityProvider {
.oauth_user_session_store
.get_session(token)
.map_err(|err| InternalError::from_source(err.into()))?
- .map(|session| session.user().subject().to_string()))
+ .map(|session| session.user().user_id().to_string()))
}
fn clone_box(&self) -> Box<dyn IdentityProvider> {
