K
Kinde•5mo ago
C

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;
});
No description
31 Replies
onderay
onderay•5mo ago
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?
C
COP•5mo ago
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.
onderay
onderay•5mo ago
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.
C
COP•5mo ago
Anything i can do to debug it further?
onderay
onderay•5mo ago
The team looked into it @C and you need to prefix with phone: on the login hint
C
COP•5mo ago
but 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("/"); });
Daniel_Kinde
Daniel_Kinde•5mo ago
Hi @C Could you send me example of a full generated register link please?
C
COP•5mo ago
Sent it as dm Any update?
onderay
onderay•5mo ago
Sorry @C in the delay, the team is looking into what is happening for you. I am nudging them again today
C
COP•4mo ago
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?
Peteswah
Peteswah•4mo ago
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",
C
COP•4mo ago
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 ); }); });
C
COP•4mo ago
Kinde docs
Custom sign-up and sign-in pages
Our developer tools provide everything you need to get started with Kinde.
C
COP•4mo ago
i realy cant get this working anymore, what can i do for further debug? It has worked for months now, but suddenly stopped.
Daniel_Kinde
Daniel_Kinde•4mo ago
Hi @C Hi, Sorry I am back from leave and will follow up on this. I am checking deeper into this.
C
COP•4mo ago
anything yet?
Daniel_Kinde
Daniel_Kinde•4mo ago
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.
<Link
href={`api/auth/register?connection_id=conn_018f089777cdc72f0e4dae0aea412dfe&login_hint=${encodeURIComponent("phone:+447712345678:gb")}&org_code=org_590d7f1a86a`}
>
Register
</Link>
<Link
href={`api/auth/register?connection_id=conn_018f089777cdc72f0e4dae0aea412dfe&login_hint=${encodeURIComponent("phone:+447712345678:gb")}&org_code=org_590d7f1a86a`}
>
Register
</Link>
C
COP•4mo ago
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.
No description
No description
No description
C
COP•4mo ago
This is after i created a country = phoneNumber.country.toLowerCase();
onderay
onderay•4mo ago
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?
C
COP•4mo ago
you can check on dev.bigscreen.dk just add a danish phone number (8 digts)
onderay
onderay•4mo ago
Thanks @C working with the team on this
C
COP•3mo ago
Did you found out what changed? As this has been working since your team implemented the login_hint function
onderay
onderay•3mo ago
@C Sorry! I have nudged the team on this again.
onderay
onderay•3mo ago
@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
No description
C
COP•3mo ago
Funny it works with that number, but not with users allready known in kindle. Try with this number 31210335 see video
C
COP•3mo ago
so the problem is on users already in system
onderay
onderay•2mo ago
Hey @C we finally found the issue! A fix has been deployed. Are you able to verify on your end?
C
COP•2mo ago
THANKS!!! - it works
Daniel_Kinde
Daniel_Kinde•2mo ago
Thank you so much for your patience and cooperation here @C , This was a tricky one to track down!
Want results from more Discord servers?
Add your server