Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake oauth server #996

Merged
merged 8 commits into from
Jul 24, 2021
Merged

Fake oauth server #996

merged 8 commits into from
Jul 24, 2021

Conversation

rwakulszowa
Copy link
Member

Fixes #994

  • prosty serwer udający oauth (tj. zwracający 302 przy każdym zapytaniu)
  • FakeProvider po stronie backendu
  • konfiguracja flagą

Ustawiłem wartość na True w docker-compose (tj. domyślnie używamy lokalnego oauth), przy założeniu, że docker-compose jest używany tylko i wyłącznie lokalnie przez developerów. Jeśli używamy go gdzieś jeszcze - zmienię wartość i dodam do readme.

Implementacja jest trywialnie prosta - póki co działa, ale w przyszłości, tj. po dodaniu kontroli dostępu, będzie wymagała zmian - np. kontroli czy zwrócony użytkownik jest adminem czy zwykłym użytkownikiem.

@rwakulszowa
Copy link
Member Author

Oj, nie zauważyłem że lint narzeka. Już poprawiam.

@rwakulszowa
Copy link
Member Author

rwakulszowa commented Jul 14, 2021

Formatowanie JS powinno zostać naprawione w #999

Edit: zrobione

rwakulszowa and others added 7 commits July 23, 2021 14:24
Simple server faking google oauth.

Changes in backend-project to be implemented in the next commit.
Added a `SOCIAL_AUTH_USE_FAKE_OAUTH` flag that, if set to true, will
configure the backend to use a fake oauth server.
Talks to a real google oauth api otherwise.
@rwakulszowa
Copy link
Member Author

@ad-m - jeśli takie podejście jest akceptowalne, to możemy zmerdżować. Zmiana ułatwia lokalne testowanie zmian.

@ad-m ad-m merged commit ad94772 into watchdogpolska:dev Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testowanie bez OAuth
2 participants