phone sign in, custom has changed
Something has changed, my custom phone log in routine is suddenly not working anymore.
This is the result (image) before the user was shown the input token page
I am triggering the page like this:
$("#loginButton").click(function() {
var loginUrl = "/register?connection_id=" + encodeURIComponent(connection_id) +
"&login_hint=" + encodeURIComponent("phone:" + phoneE164 + ":" + country) + "&org_code=" + encodeURIComponent(org_code);
window.location.href = loginUrl;
});
});
31 Replies
Sorry to hear that this is not working for you.
What Kinde SDK and version are you using?
I assume you are using your own Twillio account?
So once the user add their details and goes to try and log in, the error is thrown then?
No you miss the problem, catching the mobile number and contry on my own login page, and then sending to the sms page you provide with the
https://docs.kinde.com/authenticate/custom-configurations/custom-authentication-pages/
It has been working for a year but last week, it does not work anymore, even if i send the info
connection_id
phone
org_code
the user is shown your input phone page, (the one in the screenshot) and has to input all info again (number and contry) and then everything works as inteded
My call could be:
https://dev.xxx.dk/register?connection_id=conn_xxxx&login_hint=phone%3A%2B45xxxxx%3ADK&org_code=org_xxxx
SDK, latest:
"@kinde-oss/kinde-nodejs-sdk": "github:kinde-oss/kinde-nodejs-sdk",
Kinde docs
Custom sign-up and sign-in pages
Our developer tools provide everything you need to get started with Kinde.
Sorry for misunderstanding your setup and also that you are hitting this problem.
I am going to need to wait until a team member is online in 12hrs to look into this.
Anything i can do to debug it further?
The team looked into it @C and you need to prefix with
phone:
on the login hintbut somthing changed?
And iarent i doing that?
$("#loginButton").click(function() {
var loginUrl = "/register?connection_id=" + encodeURIComponent(connection_id) +
"&login_hint=" + encodeURIComponent("phone:" + phoneE164 + ":" + country) + "&org_code=" + encodeURIComponent(org_code);
window.location.href = loginUrl;
}); app.get("/login", kindeClient.login(), (req, res) => { return res.redirect("/"); });
}); app.get("/login", kindeClient.login(), (req, res) => { return res.redirect("/"); });
Hi @C Could you send me example of a full generated register link please?
Sent it as dm
Any update?
Sorry @C in the delay, the team is looking into what is happening for you. I am nudging them again today
Friendly nudge again, it has been working for months, suddenly stopped. Should we change anything in our end, or did you change something in your end?
Hey @C, sorry about that Daniel went on leave would you be able to send me the loginURL?
This format worked for me:
login_hint: "phone:+61 23412341243124",
But is anything changed? it has always worked like this:
$(document).ready(function() {
$("#loginButton").click(function() {
var loginUrl = "/register?connection_id=" + encodeURIComponent(connection_id) +
"&login_hint=" + encodeURIComponent("phone:" + phoneE164 + ":" + country) + "&org_code=" + encodeURIComponent(org_code);
window.location.href = loginUrl;
}); $.get( "https://x.dk/status.html", function( data ) { $( "#globalStatus" ).html( data ); }); });
}); $.get( "https://x.dk/status.html", function( data ) { $( "#globalStatus" ).html( data ); }); });
And according to documentation the Countrycode should be present
https://docs.kinde.com/authenticate/custom-configurations/custom-authentication-pages/#phone-sign-in
Kinde docs
Custom sign-up and sign-in pages
Our developer tools provide everything you need to get started with Kinde.
i realy cant get this working anymore, what can i do for further debug? It has worked for months now, but suddenly stopped.
Hi @C Hi, Sorry I am back from leave and will follow up on this. I am checking deeper into this.
anything yet?
Hi @C , I am looking at this again right now. I can see that currently the country code is case sensitive, we will look at removing this restriction, but I wanted to check if your country code are lower case. e.g.
gb
, au
, us
etc
I have just tried this code and it loaded up the confirm SMS screen as expected. I have hard coded the phone number for transparency for the format.
Its getting weirder 🙂
If i remove encodeURIComponent() from phone nr. and country is my code:
$(document).ready(function() {
$("#loginButton").click(function() {
var loginUrl = "/register?connection_id=" + encodeURIComponent(connection_id) +
"&login_hint=" + "phone:" + phoneE164 + ":" + country + "&org_code=" + encodeURIComponent(org_code);
alert(loginUrl);
alert(phoneE164);
alert(country);
window.location.href = loginUrl;
});
This is the lgoinURL alert:
/register?connection_id=conn_2f4c433293a640f2976e5fad5fa09005&login_hint=phone:+45xxxx0335:dk&org_code=org_246edc301a0
xxxx = real phone digs (i removed them for pasting here)
i am sent to the right "input token page" (see image)
BUT in twillio api i see this error:
(image)
if my code is :
$(document).ready(function() {
$("#loginButton").click(function() {
var loginUrl = "/register?connection_id=" + encodeURIComponent(connection_id) +
"&login_hint=" + encodeURIComponent("phone:" + phoneE164 + ":" + country) + "&org_code=" + encodeURIComponent(org_code);
alert(loginUrl);
alert(phoneE164);
alert(country);
window.location.href = loginUrl;
});
the loginURL alert:
/register?connection_id=conn_2f4c433293a640f2976e5fad5fa09005&login_hint=phone%3A%2B45XXXX0335%3Adk&org_code=org_246edc301a0
xxxx = real phone digs (i removed them for pasting here)
but then i am shown this page with register (image), the country is correct but the phone number is missing a digt.
This is after i created a country = phoneNumber.country.toLowerCase();
We are really stumped with this as we have it working smoothly on our end.
Can you share what is in the network tab - specifically the initial redirect to Kinde that would include the parameter so we can see if the digit is missing there?
you can check on dev.bigscreen.dk just add a danish phone number (8 digts)
Thanks @C working with the team on this
Did you found out what changed? As this has been working since your team implemented the login_hint function
@C Sorry! I have nudged the team on this again.
@C our team have tested your public auth page and we are not able to replicate your issue. Are you able to make a video of what you are seeing with the network tab open? If we need to @Oli - Kinde will be happy to jump on a call with you to get to the bottom of this.
Number entered: 33210772
Funny it works with that number, but not with users allready known in kindle. Try with this number 31210335 see video
so the problem is on users already in system
Hey @C we finally found the issue! A fix has been deployed. Are you able to verify on your end?
THANKS!!! - it works
Thank you so much for your patience and cooperation here @C , This was a tricky one to track down!