You can use JWT without Oauth2 and Oauth2 without JWT or use them together.
Keep in mind that OAuth2 manages authorization, not authentication. OAuth2 does not mind user authentication. To handle authentication, tou can take a look at OpenId Connect , a layer on top of Oauth2. OpenId Connect will send your application a signed id_token containing information about the user ID.
After authenticating the user with OpenId Connect, you can contact the OAuth server to get access_token (JWT or not). This token will be used to communicate with your API. Implicit grant flow is recommended for use in SPA.
For JWT, it is used for id_token (from OpenId Connect) and can be used for access_token (OAuth2). For access_token, your token can be by reference (recommended for SPA) or by value.
By reference, your token is opaque to clients (e.g. guid). By value, your token is collapsible, and the contained data can be read by clients.
To use the component, I personally work with Keycloak from RedHat.
Hope this helps.
source share