go-oauth2-pg icon indicating copy to clipboard operation
go-oauth2-pg copied to clipboard

Some questions about implementation

Open brutalzinn opened this issue 1 year ago • 3 comments

Thank you for sharing this project with the community. I have some questions and I couldn't find the answer in the documentation.

  1. Is it possible to list all customers of a specific user?

  2. Is it reasonable to add a column in the oauth2_clients table to identify the client, if so how do I do that?

brutalzinn avatar Mar 02 '23 11:03 brutalzinn

If I understand your question correctly - you can add a index to the data column based on your need and use it in your system to filter out required records. Since data has JSONB type it allows to set indices on the nested fields and then write queries that filter data based on the nested fields.

vgarvardt avatar Mar 12 '23 18:03 vgarvardt

Thanks for your response. I did a database design to adapt with your library without change directly or uses json to store my custom data. The orange database its the unmanagment part. I create a table between oauth2_clients and my custom data that i needed.

dbeaver

brutalzinn avatar Mar 24 '23 23:03 brutalzinn

I clone your project and do small changes with some cruds implementations for delete and update oauth clients https://github.com/brutalzinn/go-oauth2-pg

brutalzinn avatar Mar 25 '23 00:03 brutalzinn