|
|
|
func (db *datastore) GenerateOAuthState(ctx context.Context, provider, clientID string) (string, error) { |
|
|
|
func (db *datastore) GenerateOAuthState(ctx context.Context, provider, clientID string) (string, error) { |
|
|
|
_, err := db.ExecContext(ctx, "INSERT INTO oauth_client_states (state, provider, client_id, used, created_at) VALUES (?, ?, ?, FALSE, NOW())", state, provider, clientID) |
|
|
|
_, err := db.ExecContext(ctx, "INSERT INTO oauth_client_states (state, provider, client_id, used, created_at) VALUES (?, ?, ?, FALSE, "+db.now()+")", state, provider, clientID) |