I have completed an example of making a washing machine with a smart home in Google colab. This time I want to make a login function with non-fakeauth and non-faketoken methods. I'm having difficulty figuring out what to put in Authorization URL, Token URL and Fulfillment URL. There is documentation, but I don't know how to apply it. How to start?
In google identity, I have completed receiving a refresh token by exchanging codes. However, in the actions console, instead of sending to https://accounts.google.com/o/oauth2/v2/auth?. I have to authenticate with https://myservice.example.com/auth, so I can't start. I would like to know how to create myservice.example.com/auth. After that, I think I can get a token by exchanging codes in the same way.
Thanks for bringing this up. Building and running your own OAuth server on a domain you own is a viable approach if you want full control over the authentication process and need to handle more complex use cases. Here's a high-level overview of how you can set up your own OAuth server:
Choose Your Hosting Option:
Firebase Functions with Custom Domain: Firebase Functions can be an effective and serverless option for hosting your OAuth server. Follow the Firebase Hosting Custom Domain documentation to set up a custom domain for your Firebase project.
Virtual Private Server (VPS): If you prefer more control and flexibility, you can rent a VPS from a cloud provider or a dedicated hosting service. You'll need to configure and manage the server environment yourself.
Set Up an HTTP Microservice:
Whether you choose Firebase Functions or a VPS, you'll need to create an HTTP microservice to handle incoming OAuth requests. This service will handle the OAuth authentication flow, token generation, and token validation.
Implement OAuth 2.0 Flow:
Your OAuth microservice needs to implement the OAuth 2.0 authorization code flow or another suitable flow depending on your application's requirements. This includes handling authorization requests, user consent, and token issuance.