Having some trouble adding a Twilio messaging conn...
# ask-a-descoper
b
Having some trouble adding a Twilio messaging connector. It requires Account SID, API Key, API Secret, and From (number or Messaging Service SID). SMS Api requests in Twilio are usually done with Account SID and Auth Token. Is the API Key the same as the Twilio Auth Token?
b
Hi. Use the Account SID in both SID and API Key.
The AuthToken goes into the API Secret.
Will make we improve this interface.
Let me know if you managed to configure
b
Yep! Works
👍 1
Is there a way to set the phone number input to be default US instead of empty
b
not at the moment. But we are working to improve the interface of the phone input.
b
And does the component work with NextJS?
I'm getting a
document is not defined at updateDehydratedSuspenseComponent
error that I think may be caused by <SignUpOrInFlow/>
Also there's a typo here
Missing left parenthesis
And ``<button onClick={logout}>Logout</div>``
b
@salmon-night-88354 pls have a look. indeed missing left `(`` also seems like the
<button>
is closed with
</div>
👍 1
@great-diamond-35515 - can you please have a look on the NextJS question?
@bumpy-teacher-2548 thanks for the feedback! Please keep it coming 🙂
b
@breezy-evening-56597 Thank you!
👍 1
f
@bumpy-teacher-2548 It should work with NextJs but need slightly different handling for <Descope flow-id..> We will update the docs today or tomorrow and and share here.
b
Great, appreciate it!
Lovin' the ease of the Flow editor! Super cool using the product so far.
🙏 1
@breezy-evening-56597 Is there a timeline for release of the phone input customization feature? Think setting the default country would be a great, and necessary, improvement
b
Happy you like the flow editor! Will get you timeline on it ASAP (and will prioritize it accordingly)
👍 1
b
Some other random thoughts I had: 1. Using acronyms like OOTB on the getting started page increases confusion in my opinion. You have to kinda think what it stands for. 2. Styling should be possible on specific pages, more like a traditional no-code site builder. Like Framer. 3. Previewing the entire onboarding and interacting in the Descope platform would be awesome. Albeit, these opinions aren't quite dealbreakers, more optimizations. Localhost previewing for #3 is pretty good. #2 is just an inconvenience.
Apologies for so many messages haha
b
No Allen. Don't apologize. Such feedback is gold for us! 1 - agreed and we'll fix 2 - interesting idea. will relay to the product management team. 3 - Not sure I follow this one. Can you elaborate? How do you envision such interaction?
b
When you edit a flow, like adding functionality for taking a person's address, you should be able to hit a button like "preview" and then view an interactive component that is like running the component in a webapp
like instead of having to go to ur React code and add the <SignUpOrIn/> component, you should be able to view and interact with the auth flow in the Descope browser
b
ah... got it. yeah we talked about such capability... will definitely follow up on it.
f
Did you try our sample app? You can pass your project id to it dynamically
b
haven't tried the sample app yet
That can show you your flow fully dynamic
b
Says the site can't be reached?
b
then add
?project=<your project>
f
By the way that saves your project id in local storage so if you want to experience the default flow delete it later
b
Got it, thanks! Think i did see this in the docs
g
hey Allen, thanks for the feedback! Nice to meet ya, I’m an engineer from the Descope team reg 3 point: “Previewing the entire onboarding and interacting in the Descope platform would be awesome.” we have a way to interact with flows in the “Getting Started” page, after you choose the flow combination, does this provide a good option for that?
Regarding
document is not defined at updateDehydratedSuspenseComponent
can you share a small code snippet describing how you got this error? we have a next sample app that uses descope-react-sdk note that access to some resources (such as
Descope
component) can be done only in the client side render (because it is heavily interacts with the browser api such as document, local storage, etc):
Copy code
// Descope component interacts with browser API and should render only in CSR
const DescopeWC = dynamic(
  async () => {
    const { Descope } = await import("@descope/react-sdk");
    return (props: React.ComponentProps<typeof Descope>) => (
      <Descope {...props} />
    );
  },
  {
    ssr: false,
  }
);
b
Hi @great-diamond-35515! Thanks for your help! For point 3, the way of interacting with flows you made a screenshot of was quite helpful--great way to visualize the value prop. But being to make flow changes side by side with a real-time render in the Descope platform would be cool. It's not make or break for me, since having localhost open in another tab to view changes is pretty similar.
👍 1
Ah ic, I wrongly assumed the React Descope component would work with Next but it seems using the WebComponent is the right way. Sample app is helpful, got it working!
g
Great 😊 If you have any questions/comments we would love to hear! I’m quite noob in nextJS framework, and fyi we plan to have a dedicated descope-next-sdk with relevant feature set
👍 1
b
Awesome!
🙏 1
How can email input validation be customized? Like only allowing for certain domains?
g
Though the email input validation cannot be customized, you can add a conditional step after the state to check that email ends with/contains specific domain, and if not - to show some message to the user, and take them back to the login screen But interesting request, I will convey this request to the product team
b
The conditional may just be good enough! Thanks!
👍 1
g
FYI, if your use-case concern about specific tenants (which is usually fits b2b) - you can also use tenant configuration to allow only specific tenants to sign up/in to a specific tenant
👍 1
b
1. The Descope OTP SMS message send max is like 100/month right? Think we hit the max because it kept throwing an error that was fixed by switching to a Twilio connector. Seeing # of OTP messages sent on the Authentication Methods page would help--didn't see the SMS sent exceeded notification till too late. And, more specific error messaging in auth validation UI would be cool. 2. Is it possible to get the userId of certain users from the "Manage -> Users" page? Only phone, email, name, login id, etc are available
f
@bumpy-teacher-2548 We are tracking the request to show the messages sent. You can see user id by clicking edit -
b
Got it! Also, what's the recommended way of getting the user data (name, phone, etc.) in the
onSuccess
callback?
f
Event has it. e.detail or details. Please print as json. Will add to documentation
👍 1
b
Think Descope has been a great product so far. The only major complaint from our users is not having the country code preset for phone number input. Having to scroll down a huge list and select US is quite cumbersome especially when most ppl r that country code. Is there a timeline for this?
👍 1
f
@bumpy-teacher-2548 that’s for the feedback. We are tracking this for near term. We will get back to you soon.
g
hi @bumpy-teacher-2548 nice to meet you! i’m Yael, PM in Descope 🙂 just wanted to update that we’re planning on enhancing the phone input component’s capabilities next week, and will provide 2 new features: • auto-detection of country code - instead of the user needing to select their country, it will be automatically selected for them. • default county selection - if you specifically want to define the default country that will appear in the dropdown - you will be able to override the auto-detection and select one of your choice. i hope this will be helpful! let me know if there’s anything else we can do for you 🙏🏼
🙌 1
b
Hi @gifted-florist-65280, that's great news! Think this will save a lot of time and effort for end users. Definitely super helpful! Thanks!
💪🏼 1
🙏🏼 1