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

make requestAccessToken and other utils importable #194

Open
acidjazz opened this issue Sep 30, 2024 · 7 comments
Open

make requestAccessToken and other utils importable #194

acidjazz opened this issue Sep 30, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@acidjazz
Copy link
Contributor

I've been adding my own oauth providers apple , would be helpful to be able to re-use this and other utils.

@atinux atinux added the enhancement New feature or request label Sep 30, 2024
@atinux
Copy link
Owner

atinux commented Sep 30, 2024

Why not opening a PR to add support for Apple login?

This will also resolve #187

@acidjazz
Copy link
Contributor Author

Why not opening a PR to add support for Apple login?

This will also resolve #187

I can look into it but apple does not follow oauth2 standards which a lot of people are not happy about. Specifically you only get the user information the very 1st time they login with apple, after that you just get their email via the token payload

@sans1994
Copy link

Why not opening a PR to add support for Apple login?
This will also resolve #187

I can look into it but apple does not follow oauth2 standards which a lot of people are not happy about. Specifically you only get the user information the very 1st time they login with apple, after that you just get their email via the token payload

@acidjazz In fact, in certain cases, this is entirely sufficient. For example, the project I am currently working on receives data from providers only during the initial identification phase. That is, when the user logs in for the first time, I send data from the provider to the backend for identification in our system (our API returns an existing user if the email matches, or a new one is created).

So, we do not request data from the provider again, and it is only needed for identification (during login), while all further interaction happens with our backend.

@acidjazz
Copy link
Contributor Author

Why not opening a PR to add support for Apple login?
This will also resolve #187

I can look into it but apple does not follow oauth2 standards which a lot of people are not happy about. Specifically you only get the user information the very 1st time they login with apple, after that you just get their email via the token payload

@acidjazz In fact, in certain cases, this is entirely sufficient. For example, the project I am currently working on receives data from providers only during the initial identification phase. That is, when the user logs in for the first time, I send data from the provider to the backend for identification in our system (our API returns an existing user if the email matches, or a new one is created).

So, we do not request data from the provider again, and it is only needed for identification (during login), while all further interaction happens with our backend.

What about cases where the data from that provider has changed? say name details/avatar/etc ?

@sans1994
Copy link

sans1994 commented Oct 2, 2024

What about cases where the data from that provider has changed? say name details/avatar/etc ?

@acidjazz @atinux I understand the issue, but there's not much you can do, considering that Apple is unlikely to change its policy. Therefore, in my opinion, cases where a developer is ready to store user data in their own database during initial identification should be supported, as that’s all that can be done in this case (clearly documenting it). As I mentioned, this functionality is fully sufficient for my case, as I only identify the user in the system by their email and then retrieve the necessary data from my own server.

It would be great if nuxt-auth-utils could support this provider’s functionality at least in this way (since due to the limitations, there’s no better approach available).

@acidjazz
Copy link
Contributor Author

acidjazz commented Oct 2, 2024

What about cases where the data from that provider has changed? say name details/avatar/etc ?

@acidjazz @atinux I understand the issue, but there's not much you can do, considering that Apple is unlikely to change its policy. Therefore, in my opinion, cases where a developer is ready to store user data in their own database during initial identification should be supported, as that’s all that can be done in this case (clearly documenting it). As I mentioned, this functionality is fully sufficient for my case, as I only identify the user in the system by their email and then retrieve the necessary data from my own server.

It would be great if nuxt-auth-utils could support this provider’s functionality at least in this way (since due to the limitations, there’s no better approach available).

Agreed, thats what I've had to do.

I will start a PR soon and link to this issue, glad to see other people have had to go down this road, input will be greatly appreciated!

@sans1994
Copy link

sans1994 commented Nov 4, 2024

What about cases where the data from that provider has changed? say name details/avatar/etc ?

@acidjazz @atinux I understand the issue, but there's not much you can do, considering that Apple is unlikely to change its policy. Therefore, in my opinion, cases where a developer is ready to store user data in their own database during initial identification should be supported, as that’s all that can be done in this case (clearly documenting it). As I mentioned, this functionality is fully sufficient for my case, as I only identify the user in the system by their email and then retrieve the necessary data from my own server.
It would be great if nuxt-auth-utils could support this provider’s functionality at least in this way (since due to the limitations, there’s no better approach available).

Agreed, thats what I've had to do.

I will start a PR soon and link to this issue, glad to see other people have had to go down this road, input will be greatly appreciated!

Greetings! Have you had a chance to find time to integrate this provider into the library and can i expect it to be available soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants