Repository navigation
handling new workflow for user auth - #23
Conversation
| if not college_id: | ||
| try: | ||
| auth.delete_user(uid) | ||
| except: |
Check notice
Code scanning / Bandit (reported by Codacy)
Try, Except, Pass detected. Note
There was a problem hiding this comment.
Pylintpython3 (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
Pylint (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
|
||
| import os, requests | ||
| from .schema import LoginSchema, SignUpSchema | ||
| import os |
Check warning
Code scanning / Prospector (reported by Codacy)
Unused import os (unused-import) Warning
|
|
||
| def _get_college_by_domain(email: str): | ||
| try: | ||
| if not email: return None, None |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 2 spaces, expected 4 (bad-indentation) Warning
|
|
||
| def _get_college_by_domain(email: str): | ||
| try: | ||
| if not email: return None, None |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
| except Exception as e: | ||
| return _create_response(status.HTTP_500_INTERNAL_SERVER_ERROR, str(e)) | ||
|
|
||
| try: |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
|
|
||
| try: | ||
| decoded = auth.verify_id_token(token) | ||
| except Exception: |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
|
|
||
| if not college_id: | ||
| try: | ||
| auth.delete_user(uid) |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 8 spaces, expected 16 (bad-indentation) Warning
| if not college_id: | ||
| try: | ||
| auth.delete_user(uid) | ||
| except: |
Check warning
Code scanning / Prospector (reported by Codacy)
No exception type(s) specified (bare-except) Warning
| if not college_id: | ||
| try: | ||
| auth.delete_user(uid) | ||
| except: |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning
| try: | ||
| auth.delete_user(uid) | ||
| except: | ||
| pass |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 8 spaces, expected 16 (bad-indentation) Warning
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
||
| user_doc_ref.set({ |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
No description provided.