谷歌身份验证器丢失如何找回,谢谢
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了谷歌身份验证器丢失如何找回,谢谢相关的知识,希望对你有一定的参考价值。
第一步,下载并安装谷歌身份验证器(Google Authenticator)。苹果手机直接去应用商店下载即可,国内安卓手机没有 Google Play,有条件的朋友尽量安装 Google Play 后下载,若实在没有办法,则在本手机自带品牌应用商店(如小米应用商店)或者其它知名第三方应用商店(如腾讯的应用宝、360手机助手等)下载,安全性较高。涉及加密资产账号安全的工具切勿在来路不明的地方下载使用。
第二步,添加该平台提供的谷歌身份验证密钥。打开谷歌身份验证器 App,安卓手机点击“添加新账户”,苹果手机点击“+”,扫描二维码添加;如果无法扫描二维码,可以手动输入密钥。
第三步,备份!这一步很多人都会忽略,但是特别重要。上图显示的这个二维码和密钥,功能是一样的,只要有其中的任何一个,都可以知道你的谷歌验证码。所以,要像重视加密货币的钱包私钥一样,重视你的谷歌验证器私钥,最好是备份到离线的设备。
第四步,填写谷歌身份验证码和其他密码,完成谷歌身份验证绑定。
在第四步中,如果你输入的谷歌验证码不对,有以下几种解决措施:
首先,检查手机的系统时间和绑定谷歌验证的页面所在的设备(比如你是在电脑上操作的)系统时间是否一致。谷歌验证码和时间是密切相关的,系统时间不一致,会对验证码产生影响。如果确定不一致,需要先将时间校准。
确保你输入的是有效的谷歌验证码。验证码默认每 30 秒更新一次,少部分人操作速度慢,等输入完密码,谷歌验证码已经更新为另外一个了。
是否退出过绑定页面,如果退出过,需要从第二步重新开始做起。因为在没完成绑定之前,退出并重新进入,交易平台会给你不同的谷歌验证密钥。
如果不小心误删了谷歌验证器 App,或者是装有谷歌验证器 App 的手机设备坏了,或是换了新手机,只要重新下载 App,输入步骤三中备份的二维码或是明文密钥即可。这也是为什么一直强调要备份的原因了。
朋友,晚上好呀!你的问题我已经看到了,马上为你解答!
谷歌验证器密匙丢失了用下面方法找:1、Google身份验证器在应用商店都是可以下载安装。2、Google身份验证器安装成功首次运行需要配置一下才可以使用的。点击【开始设置】。3、添加账户有两种方式【扫描条形码】或【输入提供的密钥】,账户是需要绑定Google身份验证器的应用程序或网站会提供二维码和密钥的。4、我用输入提供的密钥做为演示,输入应用程序或网站二维码和密钥。点击【添加】。5、把应用程序成功绑定Google身份验证器了。Google身份验证器每隔三十秒就会变的。这就实现了动态验证码的功能。6、配置完成了以后就绑定到所需要Google身份验证器的应用程序上去了。
朋友,觉得满意的话,麻烦给个赞,谢谢!祝你生活愉快
DotNet Core 3.1 身份验证:oauth 状态丢失或无效
【中文标题】DotNet Core 3.1 身份验证:oauth 状态丢失或无效【英文标题】:DotNet Core 3.1 Authentication: The oauth state was missing or invalid 【发布时间】:2021-11-06 04:16:56 【问题描述】:我不断收到 oauth 状态在我的暂存服务器中丢失或无效,但此代码在我的本地托管 IIS 中运行良好。
附:在我被发送到重复页面之前,我已经尝试了 *** 中的所有页面,并且我查看了整个谷歌。我删除了 CallbackPath 并且它也坏了:
我正在使用 AWS 负载均衡器和在 IIS 7 中运行的两个应用程序实例。
错误:ArgumentException:必须提供“CallbackPath”选项。 (参数'CallbackPath')
点网代码:
public void ConfigureServices(IServiceCollection services)
services.Configure<CookiePolicyOptions>(options =>
options.MinimumSameSitePolicy = SameSiteMode.Lax;
)
.AddAuthentication(options =>
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = "SportsEngine";
)
.AddCookie()
.AddOAuth("SportsEngine", options =>
// Client Info
options.ClientId = Configuration["SSO:SeApiClientId"];
options.ClientSecret = Configuration["SSO:SeApiClientSecret"];
options.CallbackPath = new PathString("/oauth/authorize");
// Client Endpoints
options.AuthorizationEndpoint = Configuration["SSO:SSOAuthority"];
options.TokenEndpoint = Configuration["SSO:SSOTokenEndpoint"];
// Save token
options.SaveTokens = true;
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
// TODO: Need to figure out how to add SeriLog in here
);
services.AddResponseCaching();
services.AddControllersWithViews();
services.AddScoped<IContextFactory, DbContextFactory>();
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
if (env.IsDevelopment())
//logger.LogInformation("In Development.");
app.UseDeveloperExceptionPage();
else
//logger.LogInformation("Not Development.");
app.UseExceptionHandler("/Home/Error");
var forwardingOptions = new ForwardedHeadersOptions()
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
;
forwardingOptions.KnownNetworks.Clear(); // Loopback by default, this should be temporary
forwardingOptions.KnownProxies.Clear(); // Update to include
app.UseForwardedHeaders(forwardingOptions);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
// Auth
app.UseCookiePolicy();
app.UseAuthentication();
app.UseAuthorization();
// add caching to pipe
app.UseResponseCaching();
app.UseEndpoints(endpoints =>
endpoints.MapControllerRoute(
name: "default",
pattern: "controller=Home/action=Index/id?");
);
app.UseSerilogRequestLogging(options =>
// Customize the message template
options.MessageTemplate = "Handled RequestPath";
// Emit debug-level events instead of the defaults
options.GetLevel = (httpContext, elapsed, ex) => LogEventLevel.Debug;
// Attach additional properties to the request completion event
options.EnrichDiagnosticContext = (diagnosticContext, httpContext) =>
diagnosticContext.Set("RequestHost", httpContext.Request.Host.Value);
diagnosticContext.Set("RequestScheme", httpContext.Request.Scheme);
;
);
堆栈跟踪
2021-09-08 21:19:21.154 +00:00 [WRN] No XML encryptor configured. Key c83f05de-c4ba-4fc0-b4d6-f550329e41ef may be persisted to storage in unencrypted form.
2021-09-08 21:19:21.695 +00:00 [INF] Application started. Press Ctrl+C to shut down.
2021-09-08 21:19:21.695 +00:00 [INF] Hosting environment: testdrive
2021-09-08 21:19:21.696 +00:00 [INF] Content root path: C:\Octopus\Applications\Testdrive\Machine.MVC\0.0.1995
2021-09-08 21:19:21.786 +00:00 [INF] Request starting HTTP/1.1 GET http://stagingmachine.xyz/oauth/authorize?code=b758c76d24011e86e4c68d9cec728072&state=CfDJ8KjLM7huDtpBl3WGRqwXMZXawockkQzpDjTluDmfzmzN2R2GNrBg7fj0LbsIZavTGXsBscbDxLfjRtXf_8WPCIVUm-FtBiq0lx8jC09ZiXPS_uciWJ0GLcL73Xj3S0kXU8-bgekYUkOfN9UykxIIYLQe9tUeX2RpDWn4Aj5R0BoEJJt-h3jmYaaQwzFAtnQJHbmVWmfA64x01igEan_F6rE
2021-09-08 21:19:22.072 +00:00 [INF] Error from RemoteAuthentication: The oauth state was missing or invalid..
2021-09-08 21:19:22.082 +00:00 [ERR] An unhandled exception has occurred while executing the request.
System.Exception: An error was encountered while handling the remote login.
---> System.Exception: The oauth state was missing or invalid.
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
2021-09-08 21:19:22.188 +00:00 [INF] No cached response available for this request.
2021-09-08 21:19:22.191 +00:00 [INF] Executing endpoint 'Machine.MVC.Controllers.HomeController.Error (Machine.MVC)'
2021-09-08 21:19:22.253 +00:00 [INF] Route matched with action = "Error", controller = "Home". Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult Error() on controller Machine.MVC.Controllers.HomeController (Machine.MVC).
2021-09-08 21:19:22.355 +00:00 [INF] Executing ViewResult, running view Error.
2021-09-08 21:19:22.532 +00:00 [INF] Executed ViewResult - view Error executed in 207.3459ms.
2021-09-08 21:19:22.536 +00:00 [INF] Executed action Machine.MVC.Controllers.HomeController.Error (Machine.MVC) in 279.6243ms
2021-09-08 21:19:22.536 +00:00 [INF] Executed endpoint 'Machine.MVC.Controllers.HomeController.Error (Machine.MVC)'
2021-09-08 21:19:22.538 +00:00 [INF] The response could not be cached for this request.
2021-09-08 21:19:22.569 +00:00 [INF] Request finished in 796.8368ms 500 text/html; charset=utf-8
2021-09-08 21:19:22.737 +00:00 [INF] Request starting HTTP/1.1 GET http://stagingmachine.xyz/oauth/img/footer/twitter.png
2021-09-08 21:19:22.737 +00:00 [INF] Request starting HTTP/1.1 GET http://Stagingmachine.xyz/oauth/img/footer/facebook.png
2021-09-08 21:19:22.742 +00:00 [INF] No cached response available for this request.
2021-09-08 21:19:22.742 +00:00 [INF] No cached response available for this request.
2021-09-08 21:19:22.746 +00:00 [INF] The response could not be cached for this request.
2021-09-08 21:19:22.746 +00:00 [INF] The response could not be cached for this request.
2021-09-08 21:19:22.750 +00:00 [INF] Request finished in 13.9281ms 404
2021-09-08 21:19:22.750 +00:00 [INF] Request finished in 13.3817ms 404
【问题讨论】:
您是否使用负载平衡?并拥有多个服务副本? 是的,我忘了说我正在使用 AWS 进行负载平衡,我们部署到多个 IIS 实例。 【参考方案1】:当您使用负载平衡时,您需要确保发出初始身份验证请求的客户端实例与使用授权码处理回调的客户端实例相同。客户端需要记住调用之间的状态参数。
【讨论】:
如何在 dotnet core 中做到这一点? 我猜你需要在负载均衡器中处理这个问题,浏览器发送到 /signin-oidc 的请求需要转到发出初始身份验证请求的同一实例。或者,您可以尝试为每个客户端设置一个唯一的 redirect_url,该客户端硬编码到每个实例。但这一切都取决于您的设置 添加已启用的粘性会话并让 OAuth 正常工作。以上是关于谷歌身份验证器丢失如何找回,谢谢的主要内容,如果未能解决你的问题,请参考以下文章
R星游戏如何绑定二次验证码_虚拟MFA_两步验证_谷歌身份验证器?
humlbe bundle如何绑定二次验证码_虚拟MFA_两步验证_谷歌身份验证器?
paypal支付平台如何使用二次验证码_虚拟MFA_两步验证_谷歌身份验证器?