Code Monkey home page Code Monkey logo

justauth / justauth Goto Github PK

View Code? Open in Web Editor NEW
16.0K 334.0 2.7K 9.33 MB

🏆Gitee 最有价值开源项目 🚀:100: 小而全而美的第三方登录开源组件。目前已支持Github、Gitee、微博、钉钉、百度、Coding、腾讯云开发者平台、OSChina、支付宝、QQ、微信、淘宝、Google、Facebook、抖音、领英、小米、微软、今日头条、Teambition、StackOverflow、Pinterest、人人、华为、企业微信、酷家乐、Gitlab、美团、饿了么、推特、飞书、京东、阿里云、喜马拉雅、Amazon、Slack和 Line 等第三方平台的授权登录。 Login, so easy!

Home Page: https://www.justauth.cn

License: MIT License

Java 99.61% Shell 0.39%
justauth oauth2 qqlogin googlelogin weixinlogin

justauth's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

justauth's Issues

微信小程序支持吗

你好,看了一下,没有找到微信小程序登录,请问有微信小程序登录吗

Who is using JustAuth?(欢迎使用 JustAuth 的个人、组织和公司在此留言)

Who is using JustAuth?

Sincerely thank everyone who constantly keeps on using and supporting JustAuth. We will try our best to make JustAuth better and make the community and ecology more prosperous.

The original intention of this issue

  • We’d like to listen to the community to make JustAuth better.
  • We want to attract more partners to contribute to JustAuth.
  • Learn more about the practical use scenarios of JustAuth to facilitate the next step of planning.

What we expect from you

Please submit a comment in this issue to include the following information:

your company, school or organization.
your city and country.
your contact info: blog, email, twitter (at least one).
for what business scenario do you use JustAuth.

You can refer to the following sample answer:

* Organization: JustAuth    
* Location: Beijing, China    
* Contact: [email protected]
* Purpose: Quickly integrate third-party authorization login. 

Thanks again for your participation! Your support is the motivation for us to move forward.
JustAuth Team

谁在使用 JustAuth?

感谢正在使用和关注 JustAuth 的开发者,我们会持续投入,让 JustAuth 项目和社区更加繁荣。

这个 issue 的出发点

  • 聆听社区的声音,让 JustAuth 解决实际的问题
  • 吸引更多的开发者参与和贡献
  • 更多的了解 JustAuth 的实际使用场景,以便后续版本的计划

我们期待您能提供

在此提交一条评论, 评论内容包括:

您所在公司、学校或组织
您所在的城市、国家
您的联系方式: 微博、邮箱、微信 (至少一个)
您将 JustAuth 用于哪些业务场景

可以参考下面的示例:

组织:JustAuth
地点:**北京
联系方式: [email protected]
使用场景:快速集成第三方授权登录

多谢您的支持!
JustAuth 团队

bug: there is an error when integration actframework

哪个平台?

系统:MacOS Mojave
JDK:jdk1.8.0_162
ActFramework:1.8.26.0
JustAuth:1.9.1

重现步骤

添加依赖,直接启动

报错信息

Exception in thread "main" org.osgl.exception.UnexpectedMethodInvocationException: java.lang.UnsupportedClassVersionError: module-info has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at org.osgl.exception.UnexpectedMethodInvocationException.triage(UnexpectedMethodInvocationException.java:44)
	at org.osgl.Lang.invokeStatic(Lang.java:8061)
	at act.Act.bootstrap(Act.java:1178)
	at act.Act.start(Act.java:688)
	at com.xkcoding.demo.AppEntry.main(AppEntry.java:24)
Caused by: java.lang.UnsupportedClassVersionError: module-info has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(ClassLoader.java)
	at java.lang.ClassLoader._jr$defineClass(ClassLoader.java:763)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:42016)
	at act.boot.BootstrapClassLoader.defineClassX(BootstrapClassLoader.java:96)
	at act.boot.BootstrapClassLoader.defineClass(BootstrapClassLoader.java:104)
	at act.boot.app.FullStackAppBootstrapClassLoader.loadActClass(FullStackAppBootstrapClassLoader.java:411)
	at act.boot.app.FullStackAppBootstrapClassLoader.loadClass(FullStackAppBootstrapClassLoader.java:375)
	at act.boot.app.FullStackAppBootstrapClassLoader.pluginClasses(FullStackAppBootstrapClassLoader.java:110)
	at act.Act.pluginClasses(Act.java:265)
	at act.plugin.PluginScanner.scan(PluginScanner.java:45)
	at act.Act.loadPlugins(Act.java:993)
	at act.Act.startup(Act.java:330)
	at act.Act.startup(Act.java:1272)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45009)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45012)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.osgl.Lang.invokeStatic(Lang.java:8059)
	... 3 more

feat: update Github authorization

Why did you add this feature?

I got an email from Github:

Hi @wangyonghong,

On September 1st, 2020 at 01:44 (UTC) your application (OAuth local) used an access token (with the User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 simple-http) as part of a query parameter to access an endpoint through the GitHub API:

https://api.github.com/user

Please use the Authorization HTTP header instead as using the access_token query parameter is deprecated.

Depending on your API usage, we'll be sending you this email reminder on a monthly basis.

Visit https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param for more information about suggested workarounds and removal dates.

Thanks,
The GitHub Team

Feature description

Please use the Authorization HTTP header instead as using the access_token query parameter is deprecated.

请问出现这两个错误是什么原因?

Issue description

me.zhyd.oauth.exception.AuthException: The code passed is incorrect or expired.

com.xkcoding.http.exception.SimpleHttpException: java.net.SocketException: Connection reset

Environment

  • JustAuth version(1.15.7-beta.3)
  • hutool-http(5.2.5)
  • jdk(1.8)

app接口后台授权问题

app授权后拿到的是openId,如果app这边传递过来是type和openId
后台根据type从对应第三方验证openId是否合法已经获取用户的基本信息。
是否能添加进这些功能

关于state的使用问题

生成的state参数,是不是要和当前session绑定,或者存到cookie中,才能避免CSRF攻击?
攻击者可以使用自己的第三方账号,授权拿到code和state,诱导受害者去点击触发回调请求,在不绑定session的情况下,回调接口中对state校验是可以通过的。
我理解的有问题么?

调用接口报错

我集成的代码如下:

    <dependency>
        <groupId>com.xkcoding</groupId>
        <artifactId>justauth-spring-boot-starter</artifactId>
        <version>1.0.1</version>
    </dependency>

Controller层使用的例子,也是demo .我本地调用的时候:
调用地址:http://localhost:8080/oauth/login/GITHUP

报错如下:
image

Bug: [转自邮件] 微信登录扫码报错

以下内容来自邮件(244277971 [email protected] Sat, Oct 31, 2020 at 7:01 PM):

使用justAuth(Version:1.15.8)时,正常情况下测试没有问题;当使用内网穿透时,在微信登录扫码页面,扫码后报错:

2020-10-31 18:53:00 http-nio-9503-exec-1 me.zhyd.oauth.log.Log(error:45) [ERROR] - Failed to login with oauth authorization.me.zhyd.oauth.exception.AuthException: Illegal state [WECHAT_OPEN]	
at me.zhyd.oauth.utils.AuthChecker.checkState(AuthChecker.java:110)	
at me.zhyd.oauth.request.AuthDefaultRequest.login(AuthDefaultRequest.java:77)

打印核心日志: authResponse : {"msg":"Illegal state [WECHAT_OPEN]","code":5009}

此问题发现有很多人遇到过,参考:https://blog.csdn.net/yan50050/article/details/79654700

解决办法:在AuthWeChatMpRequest.java 第128行加上如下

.queryParam("state", getRealState(state).concat("&connect_redirect=1#wechat_redirect"))

image

麻烦解决一下,大神们可以加上打个测试jar发我,然后我在本地测试一下看看是否确实可以解决,谢谢(maven 打包上传到库不太熟悉,希望大神帮个忙哈!)

关于扩展

您好,公司内部用的明道云,justAuth没有集成,我参照gitee的实现,继承了AuthDefaultRequest,发现要传入的AuthSource是枚举,里面是定义好的,没法自己去实现呀

辛苦辛苦啊

一个一个测试都够费劲的,体力活都帮撸完了,辛苦啊~~

Awesome! 借楼招个人,服务端朋友看过来

字节跳动教育线新项目,大投入,千亿级市场,服务端工程师大量缺口,各级别都要。项目主要使用Golang/Python,但是语言不做要求,可以来了再学。研发直招渠道,快速反馈,支持年前面试(可以远程面试),年后报道,北京、上海都有HC。完整简历请投邮箱 [email protected]。邮件标题:在线教育+姓名

支持沙箱(测试)环境的使用

就是会不会遇到这种可能,当一个大厂的流程比较严谨的时候,必须要经过测试环境才允许上线,然后测试环境的选择是对应第三方的沙箱环境的case的时候,发现justauth不能切换沙箱环境,导致最终技术选型或者决策的时候不用justauth,就目前的用户的使用状况来看这是一个优先级很低的issue

这是什么呀

对不起我是新手,这是什么东西,支持这么多是干什么的:sweat:

第一优先级使用默认方式,第二优先级使用自定义方式的问题

facebook方式登录时需要服务器翻墙,但是服务器不能访问境外网站 ,所以要在一个可以访问境外网站的服务器上做一次中转 这样的话source里边定义的 accessToken 等网站就需要更换成中转地址,但是自定义的方式是在默认type不存在的情况下才会触发,所以我就需要以type=facebook1的这种自定义方式处理,如果优先取自定义的实现类 应该就不会出现这种问题吧 -_-

微博登录回调403

image

微博登录回调返回该response! 可以看出这个具体是什么原因导致的么?

版本: 1.15.6

httpclient 版本:4.5.6

@GetMapping("/oauth/callback/{source}")
    public Object login(@PathVariable("source") String source, AuthCallback callback, HttpServletRequest request) {
        log.info("进入callback:" + source + " callback params:" + JSONObject.toJSONString(callback));
        AuthRequest authRequest = getAuthRequest(source);
        AuthResponse<AuthUser> response = authRequest.login(callback);
        log.info("responseData={}",JSONObject.toJSONString(response));
        if (response.ok()) {
            return response.getData();
//            userService.save(response.getData());
        }
        return response;
    }

对方案的理解有点问题,想请教~

我是一名客户端开发者,我们做app时经常会集成第三方的sdk来实现第三方登陆。 我看这个库是服务端的实现吧,具体的应用场景是在哪儿啊? 是网页?涉及不涉及原生app的接口调用?
谢谢了!🙏

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.