﻿
{"id":11987,"date":"2019-09-01T20:33:49","date_gmt":"2019-09-01T20:33:49","guid":{"rendered":"https:\/\/www.gencayyildiz.com\/blog\/?p=11987"},"modified":"2019-09-01T20:33:49","modified_gmt":"2019-09-01T20:33:49","slug":"asp-net-core-identity-invalid-token-hatasi-ve-cozumu","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/asp-net-core-identity-invalid-token-hatasi-ve-cozumu\/","title":{"rendered":"Asp.NET Core Identity &#8211; Invalid Token Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Merhaba,<\/p>\n<p>Bu i\u00e7eri\u011fimizde Identity mekanizmas\u0131n\u0131n kullan\u0131ld\u0131\u011f\u0131 Asp.NET Core uygulamalar\u0131nda herhangi bir senaryoya hususi olarak \u00fcretilen token de\u011ferini mail yahut farkl\u0131 aparatlar e\u015fli\u011finde farkl\u0131 noktalara ta\u015f\u0131rken al\u0131nan &#8220;Invalid Token&#8221; hatas\u0131 \u00fczerine konu\u015fuyor olaca\u011f\u0131z.<\/p>\n<p>\u00d6rne\u011fin, &#8216;<a href=\"https:\/\/www.gencayyildiz.com\/blog\/asp-net-core-identity-sifremi-unuttum-xi\/\" rel=\"noopener noreferrer\" target=\"_blank\">\u015fifremi unuttum<\/a>&#8216; senaryolar\u0131nda kullan\u0131c\u0131n\u0131n \u015fifreyi resetlemesi i\u00e7in \u00fcretilen token de\u011ferini olu\u015fturulan g\u00fcncelleme url&#8217;ine query string olarak vererek mail arac\u0131l\u0131\u011f\u0131yla g\u00f6nderdi\u011fimiz taktirde, ilgili url&#8217;den gelen token de\u011feri ile \u015fifreyi resetlemeye \u00e7al\u0131\u015ft\u0131\u011f\u0131m\u0131z zaman a\u015fa\u011f\u0131daki gibi &#8220;Invalid Token&#8221; hatas\u0131n\u0131 almaktay\u0131z.<br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc.jpg\" alt=\"Asp.NET Core Identity - Invalid Token Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc\" width=\"412\" height=\"109\" class=\"aligncenter size-full wp-image-11993\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc.jpg 412w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-300x79.jpg 300w\" sizes=\"auto, (max-width: 412px) 100vw, 412px\" \/><\/a><\/p>\n<p>Bu hatan\u0131n nedeni token de\u011ferindeki ge\u00e7ersiz karakterler url \u00fczerinde mail ile tutulamamakta ve ilgili token de\u011ferini y\u0131pratmaktad\u0131rlar. Bundan dolay\u0131 \u00fcretilen token de\u011ferini <em>HttpUtility.UrlEncode()<\/em> metoduyla muhafaza etmeli ve <em>HttpUtility.UrlDecode()<\/em> metoduyla da tekrar orjinal haline d\u00f6n\u00fc\u015ft\u00fcrmeliyiz.<\/p>\n<table>\n<thead>\n<tr>\n<th>Hata<\/th>\n<th>\u00c7\u00f6z\u00fcm<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-1.jpg\" alt=\"Asp.NET Core Identity - Invalid Token Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc\" width=\"672\" height=\"769\" class=\"aligncenter size-full wp-image-12004\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-1.jpg 672w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-1-262x300.jpg 262w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-2.jpg\" alt=\"Asp.NET Core Identity - Invalid Token Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc\" width=\"760\" height=\"761\" class=\"aligncenter size-full wp-image-12006\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-2.jpg 760w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-2-150x150.jpg 150w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-2-300x300.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-2-160x160.jpg 160w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-2-320x320.jpg 320w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Yukar\u0131daki g\u00f6rsellerde oldu\u011fu gibi \u00e7\u00f6z\u00fcm uyguland\u0131\u011f\u0131 taktirde a\u015fa\u011f\u0131da g\u00f6r\u00fcld\u00fc\u011f\u00fc gibi token de\u011ferinin s\u0131k\u0131nt\u0131s\u0131z ta\u015f\u0131nd\u0131\u011f\u0131na ve i\u015flendi\u011fine \u015fahit olacaks\u0131n\u0131z.<br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-3.jpg\" alt=\"Asp.NET Core Identity - Invalid Token Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc\" width=\"319\" height=\"45\" class=\"aligncenter size-full wp-image-12008\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-3.jpg 319w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2019\/09\/Asp.NET-Core-Identity-Invalid-Token-Hatas\u0131-ve-\u00c7\u00f6z\u00fcm\u00fc-3-300x42.jpg 300w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><br \/>\n\u0130lgilenenlerin faydalanmas\u0131 dile\u011fiyle&#8230;<br \/>\nSonraki yaz\u0131lar\u0131mda g\u00f6r\u00fc\u015fmek \u00fczere&#8230;<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Merhaba, Bu i\u00e7eri\u011fimizde Identity mekanizmas\u0131n\u0131n kullan\u0131ld\u0131\u011f\u0131 Asp.NET Core uygulamalar\u0131nda herhangi bir senaryoya hususi olarak \u00fcretilen token de\u011ferini mail yahut farkl\u0131 aparatlar e\u015fli\u011finde farkl\u0131 noktalara ta\u015f\u0131rken al\u0131nan &#8220;Invalid Token&#8221; hatas\u0131 \u00fczerine konu\u015fuyor olaca\u011f\u0131z. \u00d6rne\u011fin, &#8216;\u015fifremi&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":3014,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2668,2656,2811,2832,2898,258],"tags":[2952,484,3006,3007,3005,3003,3004],"class_list":["post-11987","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net-core-2","category-asp-net-core-2-mvc","category-asp-net-core-2-1","category-asp-net-core-2-2","category-asp-net-core-3-0","category-hata-cozumleri","tag-asp-net-core-identity","tag-hata-cozumu","tag-httputility-urldecode","tag-httputility-urlencode","tag-invalid-token-error","tag-invalid-token-hatasi","tag-invalid-token-hatasi-ve-cozumu"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/11987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=11987"}],"version-history":[{"count":16,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/11987\/revisions"}],"predecessor-version":[{"id":12009,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/11987\/revisions\/12009"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media\/3014"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=11987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=11987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=11987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}