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

feature/175 social log in #183

Merged
merged 7 commits into from
Apr 9, 2024
Merged

feature/175 social log in #183

merged 7 commits into from
Apr 9, 2024

Conversation

Ahydul
Copy link
Contributor

@Ahydul Ahydul commented Apr 5, 2024

Added social login in with google account

@Ahydul Ahydul requested review from claugp06 and fracalrod3 April 5, 2024 13:21
@Ahydul Ahydul self-assigned this Apr 5, 2024
@Ahydul Ahydul linked an issue Apr 5, 2024 that may be closed by this pull request
@Ahydul Ahydul requested a review from marnunrey2 April 5, 2024 13:21
Copy link
Collaborator

@claugp06 claugp06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the next time try to give a more detail explanation in the description of the PR. Secondly, I have tried to use the social log in implementation using the last changes of develop and gives this error
image
Apart from that if only the google account it is going to be use in the log in, it should be taken out from the register and if it going to be use implement.
Also (even I know it is not on your task), right now the register it is not working with the changes could you have a look over it?

Copy link
Contributor

@marnunrey2 marnunrey2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I get the same error as claudia but when clicking on "continuar con google" it does nothing and shows this error in the console:

Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/auth/o/google-oauth2/?redirect_uri=http://127.0.0.1:3000/iniciar-sesion/' from origin 'http://localhost:3000' has been blocked by CORS policy: 
The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. 
The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Also, for log in in with google I guess that firstly there needs to be a register with google implemented.

@Ahydul
Copy link
Contributor Author

Ahydul commented Apr 6, 2024

I forgot to update the comment. You need to use 127.0.0.1 and not localhost. Also a fix in the backend is on the way. We need that fix for this to work.

@Ahydul Ahydul requested a review from claugp06 April 7, 2024 16:27
@Ahydul
Copy link
Contributor Author

Ahydul commented Apr 7, 2024

The pr is merged, use the last version of develop in the backend

@claugp06
Copy link
Collaborator

claugp06 commented Apr 7, 2024

The pr is merged, use the last version of develop in the backend

Could you please be more explicit what you have done in this pr. Have ypu fixed the log in and register or only done the social log in?

Copy link
Collaborator

@claugp06 claugp06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this error when trying to access the social log in.
image
and I cannot try it. For the moment, fix the normal log in and register so it works with backend and leave this more to the side, there is things with a higher priority

@marnunrey2 marnunrey2 self-requested a review April 8, 2024 15:48
Copy link
Contributor

@marnunrey2 marnunrey2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also get the same error as claudia. I executed it from microsoft edge and this is the error message I get which might be more explicative than the error shown to claudia:
image

@Ahydul
Copy link
Contributor Author

Ahydul commented Apr 8, 2024

You probably are either not using last version of develop or not using 127.0.0.1 instead of localhost. I just checked and i need to push some commits that I guess didnt push and I didnt realise. I need to fix some conflicts first

@Ahydul
Copy link
Contributor Author

Ahydul commented Apr 8, 2024

For the moment, fix the normal log in and register so it works with backend and leave this more to the side, there is things with a higher priority

My task (and this PR) is to implement the social login. I just checked and the normal login seems to work just fine. I'm not going to check the register because its in a whole other file.

@claugp06 claugp06 self-requested a review April 8, 2024 17:14
Copy link
Collaborator

@claugp06 claugp06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is supposed to be working if I can log in with the acount but still be redirect to the log in?. The register with Google it is also consider as an option or not? Because if not the button should not appeared on the register form.
From my opinion I think that the log in does not make much sense becuase you do not indicate the role or anything maye it is more interested in the register were you are obliged to click a role and then redirect depending to it to following steps for the register

@claugp06 claugp06 self-requested a review April 9, 2024 06:59
Copy link
Collaborator

@claugp06 claugp06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The social log in works in general but what I would propose it is to leave the code there done but not showing it on the screens because for our proect and the NGO comments might not be that useful

@Ahydul Ahydul requested review from marnunrey2 and claugp06 April 9, 2024 12:06
@Ahydul
Copy link
Contributor Author

Ahydul commented Apr 9, 2024

Commented out the social login button for now. After registering using social login the account must be activated providing a dni to a post /api/auth/activate/

Copy link
Collaborator

@claugp06 claugp06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The social log in without been commented worked for me but because of not having an account activation needed it, it does only redirect to the log in (right now this funcionality more to the side).

Copy link
Contributor

@marnunrey2 marnunrey2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

@Ahydul Ahydul requested review from samrodman and ivaramlar April 9, 2024 16:16
Copy link
Contributor

@fracalrod3 fracalrod3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to do anything at the moment, unsure why it's accepted since it neither takes my data from Google nor creates a new account

@fracalrod3 fracalrod3 self-requested a review April 9, 2024 19:12
Copy link
Contributor

@fracalrod3 fracalrod3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was told by Upper Management to accept this PR anyways, so here:

@claugp06 claugp06 merged commit d1beedf into develop Apr 9, 2024
1 check passed
@claugp06 claugp06 deleted the feature/175-social-log-in branch April 9, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature/175- social log in
4 participants