Question about strapi authentification

Hello ,

I have a backend rest api developed with spring boot ,is it possible to build an authentification api in strapi based on my rest api authentification spring boot without create accounts in strapi ?

Best regards

Yes, same way strapi has other auth providers like Google, twitter, you can seth up your own oauth flow with custom apis in Strapi. A simple implementation would be

  1. One that generates the signed URL to call your springboot authentication api from the client
  2. After your spring but has authenticated the signed url, it should push the user back to your client with an “access_token”
  3. Now process the access_token in the strapi backend (It communicates with your springboot api), once it confirms the access_token, you can then:
  return ctx.send({
        jwt: getService('jwt').issue({ id: user.id }),
        user: await sanitizeUser(user, ctx),
      });

Hello ,thank you for your reply,can i generate JWT without user ? or can i use the user of my bakend spring rest api for genrerating the JWT?
Best