-
Notifications
You must be signed in to change notification settings - Fork 14
changed SDK auth flow #599
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
Conversation
| first_name: Optional[str] | ||
| last_name: Optional[str] | ||
| email: Optional[str] | ||
| picture: Optional[str] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove
| try: | ||
| response = self._service_provider.get_user(self._team_id) | ||
| if not response.ok: | ||
| raise AppException(response.error) | ||
| self._response.data = response.data | ||
| except Exception: | ||
| raise AppException( | ||
| "Unable to retrieve user data. Please verify your credentials." | ||
| ) from None | ||
| return self._response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| try: | |
| response = self._service_provider.get_user(self._team_id) | |
| if not response.ok: | |
| raise AppException(response.error) | |
| self._response.data = response.data | |
| except Exception: | |
| raise AppException( | |
| "Unable to retrieve user data. Please verify your credentials." | |
| ) from None | |
| return self._response | |
| response = self._service_provider.get_user(self._team_id) | |
| if not response.ok: | |
| self._response.errors =AppException( | |
| "Unable to retrieve user data. Please verify your credentials." | |
| ) | |
| else: | |
| self._response.data = response.data | |
| return self._response |
| def get_current_user(self): | ||
| return usecases.GetCurrentUserUseCase( | ||
| service_provider=self.service_provider, team_id=self.team_id | ||
| ).execute() | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def get_current_user(self): | |
| return usecases.GetCurrentUserUseCase( | |
| service_provider=self.service_provider, team_id=self.team_id | |
| ).execute() | |
| def get_current_user(self) -> UserEntity: | |
| response = usecases.GetCurrentUserUseCase( | |
| service_provider=self.service_provider, team_id=self.team_id | |
| ).execute() | |
| if response.errors: | |
| raise AppException(response.errors) | |
| return response.data | |
| return self._user | ||
|
|
||
| @staticmethod | ||
| def validate_token(token: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this function
No description provided.