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

Integrate an OAuth provider (server-side) #10

Closed
hsluoyz opened this issue Jan 12, 2021 · 5 comments
Closed

Integrate an OAuth provider (server-side) #10

hsluoyz opened this issue Jan 12, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@hsluoyz
Copy link
Member

hsluoyz commented Jan 12, 2021

Casdoor acts like both a OAuth client and OAuth server:

  1. For the Casdoor user applications (e.g., a forum or a blog system that uses Casdoor to manager login and permissions), Casdoor will behave as the OAuth service providers.
  2. For real 3rd-party identity providers like Gmail, Google, WeChat, Casdoor will act as an OAuth client.

We need to choose which lib in Golang for both OAuth client and server-side.

@hsluoyz hsluoyz self-assigned this Jan 12, 2021
@hsluoyz hsluoyz added enhancement New feature or request help wanted Extra attention is needed labels Jan 12, 2021
@uran0sH
Copy link
Contributor

uran0sH commented Jan 13, 2021

golang/oauth2 could serve as OAuth client. https://godoc.org/golang.org/x/oauth2#example-Config shows how to config.
go-oauth2/oauth2 could serve as an OAuth server-side. https://github.com/go-oauth2/oauth2/tree/master/example shows how to use it.

@hsluoyz
Copy link
Member Author

hsluoyz commented Jan 14, 2021

@RobotHuang why is WeChat special? If it is following official OAuth standard, then any one of OAuth servers can support it, right?

@uran0sH
Copy link
Contributor

uran0sH commented Jan 14, 2021

@hsluoyz I meant that golang/oauth2 doesn't include WeChat endpoint now. I read the source code of golang/oauth2 and find that it is easy to add other endpoints.
https://godoc.org/golang.org/x/oauth2#example-Config shows how to add a new endpoint.

@hsluoyz
Copy link
Member Author

hsluoyz commented Jan 14, 2021

@RobotHuang why https://github.com/golang/oauth2 contains OAuth server? It said:

image

@uran0sH
Copy link
Contributor

uran0sH commented Jan 14, 2021

@hsluoyz Sorry, it is my mistake. It could only be used as client.

@hsluoyz hsluoyz removed the help wanted Extra attention is needed label Mar 21, 2021
@hsluoyz hsluoyz closed this as completed Mar 21, 2021
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

2 participants