mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
Feature: SignIn with Twitter (#479)
* Add Twitter SignIn flow Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -39,7 +39,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isActive(channel) {
|
||||
return ['facebook', 'website'].includes(channel);
|
||||
return ['facebook', 'website', 'twitter'].includes(channel);
|
||||
},
|
||||
onItemClick() {
|
||||
if (this.isActive(this.channel)) {
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
"FB": {
|
||||
"HELP": "PS: By signing in, we only get access to your Page's messages. Your private messages can never be accessed by Chatwoot."
|
||||
},
|
||||
"TWITTER": {
|
||||
"HELP": "To add your Twitter profile as a channel, you need to authenticate your Twitter Profile by clicking on 'Sign in with Twitter' "
|
||||
},
|
||||
"WEBSITE_CHANNEL": {
|
||||
"TITLE": "Website channel",
|
||||
"DESC": "Create a channel for your website and start supporting your customers via our website widget.",
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import Facebook from './channels/Facebook';
|
||||
import Website from './channels/Website';
|
||||
import Twitter from './channels/Twitter';
|
||||
|
||||
const channelViewList = {
|
||||
facebook: Facebook,
|
||||
website: Website,
|
||||
twitter: Twitter,
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<div class="wizard-body columns content-box small-9">
|
||||
<div class="login-init full-height text-center">
|
||||
<form method="POST" action="/twitter/authorization">
|
||||
<input type="hidden" name="user_id" :value="currentUserID" />
|
||||
<woot-submit-button
|
||||
icon-class="ion-social-twitter"
|
||||
button-text="Sign in with Twitter"
|
||||
type="submit"
|
||||
/>
|
||||
</form>
|
||||
<p>{{ $t('INBOX_MGMT.ADD.TWITTER.HELP') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters({
|
||||
currentUserID: 'getCurrentUserID',
|
||||
}),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user