Change name and logo on Auth0 signup - auth0

Users get this on new signups on my app:
On auth0 dashboard I've named my app and uploaded a logo.
Where am I suppose to enter information to show this info on signup dialog?

Check the UI Customization docs
The value for logo is a URL for an image that will be placed in the Lock's header, and defaults to Auth0's logo. It has a recommended max height of 58px for a better user experience.
var options = {
theme: {
logo: 'https://example.com/logo.png'
}
};
Check also the section Customizing Text to change the name, for example:
var options = {
languageDictionary: {
emailInputPlaceholder: "something#youremail.com",
title: "Log me in"
},
};
For the sign-up:
var options = {
additionalSignUpFields: [{
name: "address",
placeholder: "enter your address",
// The following properties are optional
icon: "https://example.com/assests/address_icon.png",
prefill: "street 123",
validator: function(address) {
return {
valid: address.length >= 10,
hint: "Must have 10 or more chars" // optional
};
}
},
{
name: "full_name",
placeholder: "Enter your full name"
}]
}
additionalSignUpFields Intended for use with database signup only
additionalSignupFields are intended for use with database signups only. If you have social sign ups too, you can ask for the additional information after the users sign up (see this page about custom signup for more details). You can use the databaseAlternativeSignupInstructions i18n key to display these instructions.
For more details check Custom Signup
If using LinkedIn see this example, and also change the text as required:

Related

Vue3 - Meta data - change per sub page

I'm using vue3, and I would like to change the metadata on the subpages when they are linked in facebook or other social media sites.
I've gotten vue3-meta to "work" but it does change the title of the page from the returned api call, in the browser. But the links still pull the meta from the index.html I believe vue-meta is only changing the meta tags in the browser memory rather the root file?
It has the right name on the browser tab, but facebook debug page, it forever says the default site name, found in index.html
Package.json
"vue-meta": "^3.0.0-alpha.10",
Main.js
import { createMetaManager, plugin as vueMetaPlugin } from 'vue-meta';
let app = createApp(App)
.use(router)
.use(createMetaManager())
.use(vueMetaPlugin, {
keyName: 'metaInfo',
attribute: 'data-vue-meta',
ssrAttribute: 'data-vue-meta-server-rendered',
tagIDKeyName: 'vmid',
refreshOnceOnNavigation: true
})
Home.js
import {useMeta} from "vue-meta";
...
setup() {
useMeta({
title: 'MyAwesomeSite',
htmlAttrs: {lang: 'en', amp: true}
})
},
Product Page, This is really the one I want to change
metaInfo() {
return {
title: `${this.ProductName}`,
description: `${this.product.SlugLine}`,
twitter: {
title: `${this.productName}`,
description: `${this.product.SlugLine}`,
image: `${this.product.productImg}`,
},
og: {
title : `${this.productName}`,
description : `${this.product.SlugLine}`,
url : `${this.$route}`,
image : `${this.product.productImg}`,
site_name : `My Awesome Site`,
}
}
},

How to hide slash command to specific user or channel Discord.js v13

Is it possible to hide slash command in discord.js v13.1.0 ?
I tried to add some permission but nothing that i found worked like the
" command.permissions.add({ "permission array" }) "
If there is a way to do it it would be amazing
I saw that the support saw that issue but do you have any idea about when they would add this feature ?
I just used the discord interface. Here's what I did:
(1) Right click your server
(2) Go to Server Settings -> Integrations
(3) Scroll down to Bots and Apps and click Manage next to your bot
(4) Click Add Roles or Members, or click Channels depending on if you want to restrict to specific roles, users, or channels
(5) Once you add them, click the X to restrict their access to the command. Now they won't be able to see it anymore.
Important Note: Make sure to view the server as a non-admin role or switch accounts to a non-admin user to test the new permissions. Otherwise, it won't work. To view as another role, go to Server Settings -> Roles, then select a non-admin role, scroll to the bottom and select View Server As Role.
According to discordjs guide, you need to use ApplicationCommandPermissionsManager#set() or ApplicationCommandPermissionsManager#add():
using set()
const fullPermissions = [
{
id: '123456789012345678',
permissions: [{
id: '224617799434108928',
type: 'USER',
permission: false,
}],
},
{
id: '876543210987654321',
permissions: [{
id: '464464090157416448',
type: 'ROLE',
permission: true,
}],
},
];
await client.guilds.cache.get('123456789012345678')?.commands.permissions.set({ fullPermissions });
using add()
if (!client.application?.owner) await client.application?.fetch();
const command = await client.guilds.cache.get('123456789012345678')?.commands.fetch('876543210987654321');
const permissions = [
{
id: '224617799434108928',
type: 'USER',
permission: false,
},
];
await command.permissions.add({ permissions });

How does one assign Admin rights to a user in KeystoneJS 5?

How does on assign Admin status to a user in the Admin UI?
I have read the guide on authentication and the one on access control, but I don't understand the difference between "owner" and "admin" in KeystoneJS. When you create a User, how do you assign that User admin rights? How do you need to set up the User list to permit that? What is an "owner" then?
KeystoneJs access control is declarative, you have full control and keystone does not make any assumptions on this.
Admin: in simple words you might be thinking is Admin means that user can access Admin-UI app. but the Admin UI app is also restricted using some access control method.
By default all have access to admin ui, you can restrict that by using isAccessAllowed property in the Admin UI app constructor option.
from above link example:
new AdminUIApp({
/*...config */
isAccessAllowed: ({ authentication: { item: user, listKey: list } }) => !!user && !!user.isAdmin,
}),
in above this list item is usually from "User" list as defined in Auth Strategy
const authStrategy = keystone.createAuthStrategy({
type: PasswordAuthStrategy,
list: 'User',
config: {
identityField: 'username', // default: 'email'
secretField: 'password', // default: 'password'
},
});
...
module.exports = {
keystone: new Keystone(),
apps: [
new GraphQLApp(),
new AdminUIApp({
adminPath: '/admin',
authStrategy,
isAccessAllowed: ({ authentication: { item: user, listKey: list } }) => !!user && !!user.isAdmin,
}),
],
};
Owner: there is no owner defined by keystone, all you do is to create ownership entitlement based on declaration like for blog post, an Author is owner, based on this distinction you can allow certain action by post author like editing and submitting for approval.
all this goes into access control api, when you create access control definition, they evaluate the function and decide if that action is allowed. You can see full example of how this works in https://github.com/MadeByMike/keystone-access-control-demo and more advanced one in their test suit here - https://github.com/keystonejs/keystone/blob/master/test-projects/access-control/index.js

Multiple attachment with single callback_id: slack interactive component

Is it possible to have multiple menu attachment and allow users to select each menu before sending back the collated response?
return Promise.resolve({
text: `Rate each game`,
attachments: [
...games.map(game => ({
color: "#5A352D",
title: game,
callback_id: "game:done",
actions: [
{
name: "done",
text: "Select a score",
type: "select",
value: "game:done",
options: [
{ text: 1, value: 1 },
{ text: 2, value: 2 }
]
}
]
}))
]
});
This images shows how it renders
But, I need to call the callback only when the user has finished scoring each game.
Perhaps, I can provide an additional button for that, but how can I handle callback for these menu actions
Choosing a menu option will always fire a request to your app. But you could replace the former message and recreate the menu list each time and show the remaining menus to the user until all are chosen. Technically it will be a new message each time, but by replacing the old message the user will not notice.

Is there a square brand logo for use with OneDrive sign in?

I'm using the Live/OneDrive API to do sign in using OAuth2. Is there a square icon (similar to those available for Facebook and Google) that Microsoft permit using?
For Javascript, you can use WL.ui (reference) with "signin" for the name parameter to generate a sign-in button. You can find some sample code and more information about signing in here: http://msdn.microsoft.com/en-us/library/dn659751.aspx
<div id="signin"></div>
<script>
WL.Event.subscribe("auth.login", onLogin);
WL.init({
client_id: APP_CLIENT_ID,
redirect_uri: REDIRECT_URL,
scope: "wl.signin",
response_type: "token"
});
WL.ui({
name: "signin",
element: "signin"
});
function onLogin (session) {
if (!session.error) {
// Successful sign-in, do something
}
else {
// Handle sign-in error
}
}
</script>