Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
titleنمونه پاسخ درست first-page
 "errorsuccess": {
        "next_page": "it can be current or error or any page , if it is current stay there and toast the reason and if it is error page print it on the error page dont need to toast but for another pages toast the reason",
        "reason": ""
    },
    "success": {"otp",
		"next_page_action":"/login"
		"next_page_data":{},
        "ready_for_final_authenticate": true
    }


توضیح پاسخ :

در هر پاسخی وقتی مقدار ready_for_final_authenticate برابر true بود باید login/ فراخوانی شود و کاربر redirect شود.


پاسخ خطا (در صورتی که شاهکار اطلاعات کاربر را قبول نکند)

Code Block
languagetext
titleنمونه پاسخ اشتباه
"error": {
        "next_page": "login",
        "reason": "mobile number and national number not matched",
		"next_page_action":"/authenticate/first-page",
		"next_page_data":{}
    }

در این حالت کاربر صفحه لاگین را می‌بیند و در آنجا پیام خطا toast میشود و چون صفحه اول است درخواست initiate login نیز برای پرکردن اطلاعات صفحه زده می‌شود.


پاسخ خطا (در صورتی که کد پیامکی اشتباه زده باشد)

Code Block
languagetext
titleنمونه پاسخ خطا در کد پیامکی
"error": {
        "next_page": "otp",
        "next_pagereason": "otp was incorrect",
		"next_page_action":"/authenticate/loginfirst-page",
		"next_page_data":{},
            "readycode_forexpire_final_authenticatedate": true1111
        }
    }

توضیح پاسخ :

...