I made a FastAPI API that is used by some other back-end and not directly by a front-end. I'm trying to add a security layer with oAuth but all I'd need is a unique access token that this other API would use every time it wanted to consume mine. I haven't seen anything like this on the documentation and I was wandering if this is possible without having to define a user-login model.
I figured that instead of using any oAuth library I would just implement this solution myself by adding a function to every endpoint I wanted to secure that requires a pre made unique token. By using hashlib library I can choose any hashing algorithm I want to check if the hashed string matches the defined token so the actual password doesn't live in the code.
How to create an oAuth unique token for back-end connection